diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-11 11:05:44 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-03-11 12:46:18 +0300 |
commit | cc2138888a0219874ca5e25128b7edd54fa296ff (patch) | |
tree | b8b6c3196bd42d0a59112dab1a133a459246ab3f /CMakeLists.txt | |
parent | e7eb91365b3dc86e3555643ff8f89d7f306de900 (diff) |
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
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f149cfbcdc4..b24945d7ebd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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() |