From: Matthias Maier Date: Tue, 19 Nov 2013 14:52:55 +0000 (+0000) Subject: Testsuite: Bugfix: Allow to run the testsuite script from within an insource build X-Git-Tag: v8.1.0~248 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4da5e873050199500fffb935d45172db47c0c6c7;p=dealii.git Testsuite: Bugfix: Allow to run the testsuite script from within an insource build git-svn-id: https://svn.dealii.org/trunk@31707 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/scripts/run_testsuite.cmake b/deal.II/cmake/scripts/run_testsuite.cmake index e952fb81cb..6e7e1c1d99 100644 --- a/deal.II/cmake/scripts/run_testsuite.cmake +++ b/deal.II/cmake/scripts/run_testsuite.cmake @@ -162,10 +162,12 @@ IF("${CTEST_BINARY_DIRECTORY}" STREQUAL "") # SET(CTEST_BINARY_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - IF( "${CTEST_BINARY_DIRECTORY}" STREQUAL "${CTEST_SOURCE_DIRECTORY}") + IF( "${CTEST_BINARY_DIRECTORY}" STREQUAL "${CTEST_SOURCE_DIRECTORY}" + AND NOT EXISTS ${CTEST_SOURCE_DIRECTORY}/CMakeCache.txt ) MESSAGE(FATAL_ERROR " -ctest was invoked in the source directory (or test source directory) and CTEST_BINARY_DIRECTORY is not set. -Please either call ctest from within a designated build directory, or set CTEST_BINARY_DIRECTORY accordingly. +ctest was invoked in the source directory and CTEST_BINARY_DIRECTORY is not +set. Please either call ctest from within a designated build directory, or +set CTEST_BINARY_DIRECTORY accordingly. " ) ENDIF() diff --git a/tests/run_testsuite.cmake b/tests/run_testsuite.cmake index 00e7a1e294..5efc0979e3 100644 --- a/tests/run_testsuite.cmake +++ b/tests/run_testsuite.cmake @@ -21,9 +21,9 @@ IF( "${CTEST_BINARY_DIRECTORY}" STREQUAL "" AND "${CMAKE_CURRENT_BINARY_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}" ) MESSAGE(FATAL_ERROR " -ctest was invoked in the source directory (or test source directory) and -CTEST_BINARY_DIRECTORY is not set. Please either call ctest from within a -designated build directory, or set CTEST_BINARY_DIRECTORY accordingly. +ctest was invoked in the test directory and CTEST_BINARY_DIRECTORY is not +set. Please either call ctest from within a designated build directory, or +set CTEST_BINARY_DIRECTORY accordingly. " ) ENDIF()