diff options
author | Daniele E. Domenichelli <daniele.domenichelli@iit.it> | 2015-09-17 09:19:36 (GMT) |
---|---|---|
committer | Daniele E. Domenichelli <daniele.domenichelli@iit.it> | 2015-09-17 09:47:26 (GMT) |
commit | b04c38159eb4db35770f541f7671fe33a3f32bc2 (patch) | |
tree | 8be05d6d45985715c09f4cc791fca40af92e0d57 /Modules | |
parent | 6fd548f2205c73215812fda416fbe6f0dd166bb9 (diff) | |
download | CMake-b04c38159eb4db35770f541f7671fe33a3f32bc2.zip CMake-b04c38159eb4db35770f541f7671fe33a3f32bc2.tar.gz CMake-b04c38159eb4db35770f541f7671fe33a3f32bc2.tar.bz2 |
ExternalProject: Use GIT_VERSION_STRING instead of custom method
GIT_VERSION_STRING is available in FindGit.cmake since CMake version 2.8.8
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/ExternalProject.cmake | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 0fbf7c3..db61d23 100644 --- a/Modules/ExternalProject.cmake +++ b/Modules/ExternalProject.cmake @@ -1631,20 +1631,6 @@ function(_ep_add_mkdir_command name) endfunction() -function(_ep_get_git_version git_EXECUTABLE git_version_var) - if(git_EXECUTABLE) - execute_process( - COMMAND "${git_EXECUTABLE}" --version - OUTPUT_VARIABLE ov - ERROR_VARIABLE ev - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - string(REGEX REPLACE "^git version (.+)$" "\\1" version "${ov}") - set(${git_version_var} "${version}" PARENT_SCOPE) - endif() -endfunction() - - function(_ep_is_dir_empty dir empty_var) file(GLOB gr "${dir}/*") if("${gr}" STREQUAL "") @@ -1747,8 +1733,7 @@ function(_ep_add_download_command name) # The git submodule update '--recursive' flag requires git >= v1.6.5 # - _ep_get_git_version("${GIT_EXECUTABLE}" git_version) - if(git_version VERSION_LESS 1.6.5) + if(GIT_VERSION_STRING VERSION_LESS 1.6.5) message(FATAL_ERROR "error: git version 1.6.5 or later required for 'git submodule update --recursive': git_version='${git_version}'") endif() |