From 71bcc9e07bd5799094b328f6dce1620efb40fdf5 Mon Sep 17 00:00:00 2001 From: Navarrop Date: Wed, 5 Oct 2011 15:36:26 +0200 Subject: [PATCH] Test git version only on a git repository. --- buildtools/Cmake/CompleteInFiles.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index 465e61b645..a9bf4eaa3f 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -349,6 +349,7 @@ endif(pthread) ############### ## SVN version check ## +if(EXISTS .git) exec_program("git remote" OUTPUT_VARIABLE remote RETURN_VALUE ret) exec_program("git config --get remote.${remote}.url" OUTPUT_VARIABLE url RETURN_VALUE ret) @@ -362,7 +363,7 @@ if(url) STRING(REPLACE " " "~" GIT_DATE ${GIT_DATE}) STRING(REPLACE ":" "-" GIT_DATE ${GIT_DATE}) endif(url) - +endif(EXISTS .git) ################################### ## SimGrid and GRAS specific checks -- 2.20.1