CMake: Avoid call of find_package(Git) for every compile with buildinfo enabled
This is a bit tricky, find_package(Git) was only used to check if git is installed and actual git command was assumed to be in the PATH (while ideally it should have been GIT_COMMAND variable). This commit makes re-compile output cleaner, especially when using Ninja. Adding proper GIT_COMMAND to buildinfo.cmake is also possible via argument. Reviewers: campbellbarton Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1847
This commit is contained in:
@@ -704,6 +704,13 @@ else()
|
||||
set(COMPILER_SSE2_FLAG)
|
||||
endif()
|
||||
|
||||
if(WITH_BUILDINFO)
|
||||
find_package(Git)
|
||||
if(NOT GIT_FOUND)
|
||||
set(WITH_BUILDINFO OFF)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
TEST_SHARED_PTR_SUPPORT()
|
||||
TEST_UNORDERED_MAP_SUPPORT()
|
||||
|
||||
|
Reference in New Issue
Block a user