]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Workaround for a deadlock with certain git svn versions
authorMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 1 Jun 2014 08:29:37 +0000 (08:29 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Sun, 1 Jun 2014 08:29:37 +0000 (08:29 +0000)
git-svn-id: https://svn.dealii.org/trunk@32991 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/scripts/run_testsuite.cmake

index 5701dec0f0255f28211ffe7838138ee6d49076c0..09d1ee4c0de830febce6afc8619192e7bd13c6d2 100644 (file)
@@ -352,25 +352,28 @@ ELSE()
   # Umm, no valid subversion info was found, try again with git-svn:
   FIND_PACKAGE(Git QUIET)
   IF(GIT_FOUND)
-    EXECUTE_PROCESS(
-      COMMAND ${GIT_EXECUTABLE} svn info
-      WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
-      OUTPUT_VARIABLE _svn_WC_INFO
-      RESULT_VARIABLE _result
-      OUTPUT_STRIP_TRAILING_WHITESPACE
-      )
+    GET_FILENAME_COMPONENT(_path "${CTEST_SOURCE_DIRECTORY}" PATH)
+    IF(EXISTS ${_path}/.git/svn)
+      EXECUTE_PROCESS(
+        COMMAND ${GIT_EXECUTABLE} svn info
+        WORKING_DIRECTORY ${CTEST_SOURCE_DIRECTORY}
+        OUTPUT_VARIABLE _svn_WC_INFO
+        RESULT_VARIABLE _result
+        OUTPUT_STRIP_TRAILING_WHITESPACE
+        )
 
-    IF(${_result} EQUAL 0)
-      STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
-        "\\2" _svn_WC_URL "${_svn_WC_INFO}")
-      STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
-        "\\2" _svn_WC_ROOT "${_svn_WC_INFO}")
-      STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
-        "\\2" _svn_WC_REVISION "${_svn_WC_INFO}")
-      STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
-        "\\2" _svn_WC_LAST_CHANGED_DATE "${_svn_WC_INFO}")
-    ELSE()
-      SET(_svn_WC_INFO)
+      IF(${_result} EQUAL 0)
+        STRING(REGEX REPLACE "^(.*\n)?URL: ([^\n]+).*"
+          "\\2" _svn_WC_URL "${_svn_WC_INFO}")
+        STRING(REGEX REPLACE "^(.*\n)?Repository Root: ([^\n]+).*"
+          "\\2" _svn_WC_ROOT "${_svn_WC_INFO}")
+        STRING(REGEX REPLACE "^(.*\n)?Revision: ([^\n]+).*"
+          "\\2" _svn_WC_REVISION "${_svn_WC_INFO}")
+        STRING(REGEX REPLACE "^(.*\n)?Last Changed Date: ([^\n]+).*"
+          "\\2" _svn_WC_LAST_CHANGED_DATE "${_svn_WC_INFO}")
+      ELSE()
+        SET(_svn_WC_INFO)
+      ENDIF()
     ENDIF()
   ENDIF()
 ENDIF()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.