]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Testsuite: Bugfix: Allow to run the testsuite script from within an insource build
authorMatthias Maier <tamiko@kyomu.43-1.org>
Tue, 19 Nov 2013 14:52:55 +0000 (14:52 +0000)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Tue, 19 Nov 2013 14:52:55 +0000 (14:52 +0000)
git-svn-id: https://svn.dealii.org/trunk@31707 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/scripts/run_testsuite.cmake
tests/run_testsuite.cmake

index e952fb81cb0eb7e6732515b1c8023969da954b8c..6e7e1c1d99405605c7cb22277be3449a6d4d70c0 100644 (file)
@@ -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()
index 00e7a1e294800666d1094fa034f146684925b9a3..5efc0979e31c41772efd6fed56ca2ccbec280e6c 100644 (file)
@@ -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()

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.