summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Martín Nieto <cmn@dwim.me>2015-10-06 13:35:45 +0200
committerCarlos Martín Nieto <cmn@dwim.me>2015-11-04 17:10:13 -0800
commit47e4b74ac5d70d8458436bd5bafccc3a29a67aea (patch)
tree6a97d795b609af41287a6a0b64caded3e056ba45
parent66956c50dd8802de1c1d5f1e32e62a5013e0c4cf (diff)
downloadlibgit2-47e4b74ac5d70d8458436bd5bafccc3a29a67aea.tar.gz
CMake: be more explicit with python errors
There's been a few reports of users not understanding what the python error means, so spell out the options they have.
-rw-r--r--CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 11d836d3d..714e188e9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -579,7 +579,12 @@ INSTALL(FILES include/git2.h DESTINATION ${INCLUDE_INSTALL_DIR} )
# Tests
IF (BUILD_CLAR)
- FIND_PACKAGE(PythonInterp REQUIRED)
+ FIND_PACKAGE(PythonInterp)
+
+ IF(NOT PYTHONINTERP_FOUND)
+ MESSAGE(FATAL_ERROR "Could not find a python interpeter, which is needed to build the tests. "
+ "Make sure python is available, or pass -DBUILD_CLAR=OFF to skip building the tests")
+ ENDIF()
SET(CLAR_FIXTURES "${CMAKE_CURRENT_SOURCE_DIR}/tests/resources/")
SET(CLAR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/tests")