From: Matthias Maier Date: Sun, 1 Jun 2014 08:29:37 +0000 (+0000) Subject: CMake: Workaround for a deadlock with certain git svn versions X-Git-Tag: v8.2.0-rc1~438 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0121ce350d449a4dbbd5738a9468e05e2f2298c1;p=dealii.git CMake: Workaround for a deadlock with certain git svn versions git-svn-id: https://svn.dealii.org/trunk@32991 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/scripts/run_testsuite.cmake b/deal.II/cmake/scripts/run_testsuite.cmake index 5701dec0f0..09d1ee4c0d 100644 --- a/deal.II/cmake/scripts/run_testsuite.cmake +++ b/deal.II/cmake/scripts/run_testsuite.cmake @@ -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()