Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ac7e50d

Browse files
committed
Merge pull request libgit2#3453 from libgit2/cmn/warn-python
CMake: be more explicit with python errors
2 parents d8dc2b8 + e3f94c7 commit ac7e50d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,12 @@ INSTALL(FILES include/git2.h DESTINATION ${INCLUDE_INSTALL_DIR} )
591591

592592
# Tests
593593
IF (BUILD_CLAR)
594-
FIND_PACKAGE(PythonInterp REQUIRED)
594+
FIND_PACKAGE(PythonInterp)
595+
596+
IF(NOT PYTHONINTERP_FOUND)
597+
MESSAGE(FATAL_ERROR "Could not find a python interpeter, which is needed to build the tests. "
598+
"Make sure python is available, or pass -DBUILD_CLAR=OFF to skip building the tests")
599+
ENDIF()
595600

596601
SET(CLAR_FIXTURES "${CMAKE_CURRENT_SOURCE_DIR}/tests/resources/")
597602
SET(CLAR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/tests")

0 commit comments

Comments
 (0)