diff --git a/profiler/CMakeLists.txt b/profiler/CMakeLists.txt index 8a148d1b..a9f1d3d0 100644 --- a/profiler/CMakeLists.txt +++ b/profiler/CMakeLists.txt @@ -189,8 +189,9 @@ if(NOT DEFINED GIT_REV) set(GIT_REV "HEAD") endif() +find_package(Python3 COMPONENTS Interpreter REQUIRED) add_custom_target(git-ref - COMMAND python3 ${CMAKE_CURRENT_LIST_DIR}/../extra/git-ref.py ${GIT_REV} + COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_LIST_DIR}/../extra/git-ref.py ${GIT_REV} BYPRODUCTS GitRef.hpp ) add_dependencies(${PROJECT_NAME} git-ref)