CMakeVersion: Use FindGit module to find Git

We now require at least CMake 3.1 to build, and that has the FindGit
module.
This commit is contained in:
Brad King committed 2019-07-29 11:25:44 -04:00
1 parent e1e7986c00
commit 74ff80323c
1 file changed
+2 -3
+2 -3
View File
@@ -15,9 +15,8 @@ else()
# Try to identify the current development source version.
set(CMake_VERSION_SOURCE "")
if(EXISTS ${CMake_SOURCE_DIR}/.git)
find_program(GIT_EXECUTABLE NAMES git git.cmd)
mark_as_advanced(GIT_EXECUTABLE)
if(GIT_EXECUTABLE)
find_package(Git QUIET)
if(GIT_FOUND)
execute_process(
COMMAND ${GIT_EXECUTABLE} rev-parse --verify -q --short=4 HEAD
OUTPUT_VARIABLE head