Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Find ${CMAKE_HOME_DIRECTORY}/.git/ and not only .git.
[simgrid.git] / buildtools / Cmake / CompleteInFiles.cmake
index 4179edf..57c7461 100644 (file)
@@ -67,11 +67,8 @@ include(TestBigEndian)
 TEST_BIG_ENDIAN(BIGENDIAN)
 
 include(FindGraphviz)
-
-string(TOUPPER ${enable_pcre} enable_pcre)
-if(enable_pcre STREQUAL "AUTO" OR enable_pcre STREQUAL "ON")
 include(FindPCRE)
-endif(enable_pcre STREQUAL "AUTO" OR enable_pcre STREQUAL "ON")
+
 set(HAVE_GTNETS 0)
 if(enable_gtnets)      
        include(FindGTnets)
@@ -352,7 +349,8 @@ endif(pthread)
 ###############
 ## SVN version check
 ##
-exec_program("git remote" OUTPUT_VARIABLE remote RETURN_VALUE ret)
+if(EXISTS ${CMAKE_HOME_DIRECTORY}/.git/)
+exec_program("git remote | head -n 1" OUTPUT_VARIABLE remote RETURN_VALUE ret)
 exec_program("git config --get remote.${remote}.url" OUTPUT_VARIABLE url RETURN_VALUE ret)
 
 if(url)
@@ -365,7 +363,7 @@ if(url)
        STRING(REPLACE " " "~" GIT_DATE ${GIT_DATE})
        STRING(REPLACE ":" "-" GIT_DATE ${GIT_DATE})
 endif(url)
-
+endif(EXISTS ${CMAKE_HOME_DIRECTORY}/.git/)
 
 ###################################
 ## SimGrid and GRAS specific checks