From 0121ce350d449a4dbbd5738a9468e05e2f2298c1 Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Sun, 1 Jun 2014 08:29:37 +0000 Subject: [PATCH] CMake: Workaround for a deadlock with certain git svn versions git-svn-id: https://svn.dealii.org/trunk@32991 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/cmake/scripts/run_testsuite.cmake | 39 ++++++++++++----------- 1 file changed, 21 insertions(+), 18 deletions(-) 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() -- 2.39.5