Use CMake 3.12+ facilities for detecting Python.
[alexxy/gromacs.git] / tests / CMakeLists.txt
index 051d6d9686582db13cace85523c1f28aab9eb801..e8b65a3ed88028f8fef71d73d0b7883a45b816bd 100644 (file)
@@ -290,10 +290,10 @@ if(GMX_PHYSICAL_VALIDATION)
         # End copied from regression tests.
         #
 
-        if (NOT PYTHONINTERP_FOUND)
+        if (NOT Python3_Interpreter_FOUND)
             message(FATAL_ERROR
                     "Python not found. Physical validation requires python. \
-                     Install python, set PYTHON_EXECUTABLE to a valid python location, \
+                     Install python, set Python3_ROOT_DIR or PYTHON_EXECUTABLE to a valid location, \
                      or set GMX_PHYSICAL_VALIDATION=OFF to disable the physical validation tests.")
         endif()
         #