From: Martin Quinson Date: Fri, 2 Sep 2016 11:55:15 +0000 (+0200) Subject: cmake: fail if Python is not found X-Git-Tag: v3_14~438 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/44f6134bafb7d1869a9e1b93117ee157d56ce9b1?ds=inline cmake: fail if Python is not found --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 526bec15c0..61c9b47041 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,6 +145,9 @@ set(PythonInterp_FIND_VERSION 3) 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")