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

Skip to content

Commit e3f94c7

Browse files
committed
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.
1 parent 72b7c57 commit e3f94c7

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
@@ -575,7 +575,12 @@ INSTALL(FILES include/git2.h DESTINATION ${INCLUDE_INSTALL_DIR} )
575575

576576
# Tests
577577
IF (BUILD_CLAR)
578-
FIND_PACKAGE(PythonInterp REQUIRED)
578+
FIND_PACKAGE(PythonInterp)
579+
580+
IF(NOT PYTHONINTERP_FOUND)
581+
MESSAGE(FATAL_ERROR "Could not find a python interpeter, which is needed to build the tests. "
582+
"Make sure python is available, or pass -DBUILD_CLAR=OFF to skip building the tests")
583+
ENDIF()
579584

580585
SET(CLAR_FIXTURES "${CMAKE_CURRENT_SOURCE_DIR}/tests/resources/")
581586
SET(CLAR_PATH "${CMAKE_CURRENT_SOURCE_DIR}/tests")

0 commit comments

Comments
 (0)