summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/qphelper/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/framework/qphelper/CMakeLists.txt b/framework/qphelper/CMakeLists.txt
index 72878196a..46b6a9fbe 100644
--- a/framework/qphelper/CMakeLists.txt
+++ b/framework/qphelper/CMakeLists.txt
@@ -44,13 +44,13 @@ if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/qpReleaseInfo.inl")
set(USE_RELEASE_INFO_FILE ON)
elseif (EXISTS "${CMAKE_SOURCE_DIR}/.git")
- find_program(PYTHON_BIN python)
+ find_package(PythonInterp 2.7)
- if (PYTHON_BIN)
+ if (PYTHON_EXECUTABLE)
message(STATUS "Using git revision as release identifier")
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/qpReleaseInfo.inl
- COMMAND ${PYTHON_BIN} -B ${CMAKE_CURRENT_SOURCE_DIR}/gen_release_info.py --git --out=${CMAKE_CURRENT_BINARY_DIR}/qpReleaseInfo.inl
+ COMMAND ${PYTHON_EXECUTABLE} -B ${CMAKE_CURRENT_SOURCE_DIR}/gen_release_info.py --git --out=${CMAKE_CURRENT_BINARY_DIR}/qpReleaseInfo.inl
DEPENDS gen_release_info.py ${CMAKE_SOURCE_DIR}/.git/HEAD ${CMAKE_SOURCE_DIR}/.git/index) # \note HEAD updated only when changing branches
add_custom_target(git-rel-info DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/qpReleaseInfo.inl)
add_dependencies(qphelper git-rel-info)