Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cmake: fail if Python is not found
authorMartin Quinson <martin.quinson@loria.fr>
Fri, 2 Sep 2016 11:55:15 +0000 (13:55 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Fri, 2 Sep 2016 11:55:15 +0000 (13:55 +0200)
CMakeLists.txt

index 526bec1..61c9b47 100644 (file)
@@ -145,6 +145,9 @@ set(PythonInterp_FIND_VERSION 3)
 set(PythonInterp_FIND_VERSION_COUNT 1)
 set(PythonInterp_FIND_VERSION_MAJOR 3)
 include(FindPythonInterp)
 set(PythonInterp_FIND_VERSION_COUNT 1)
 set(PythonInterp_FIND_VERSION_MAJOR 3)
 include(FindPythonInterp)
+if(NOT PYTHON_EXECUTABLE)
+  message(FATAL_ERROR "Please install Python (version 3 or higher).")
+endif()
 
 if (APPLE)
   set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
 
 if (APPLE)
   set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")