From: maier Date: Sat, 26 Oct 2013 12:54:51 +0000 (+0000) Subject: Bugfix: Why so complicated? Just mention test overrides via environment and let envir... X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=794f52802b5fa20aaa5c4b0a41686a72cd7e8509;p=dealii-svn.git Bugfix: Why so complicated? Just mention test overrides via environment and let environment always win... git-svn-id: https://svn.dealii.org/trunk@31443 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/cmake/setup_testsuite.cmake b/deal.II/cmake/setup_testsuite.cmake index 3d6eaf89be..baa864f49f 100644 --- a/deal.II/cmake/setup_testsuite.cmake +++ b/deal.II/cmake/setup_testsuite.cmake @@ -53,7 +53,10 @@ FOREACH(_var TEST_PICKUP_REGEX TEST_OVERRIDE_LOCATION ) - SET_IF_EMPTY(${_var} $ENV{${_var}}) + IF(NOT "$ENV{${_var}}" STREQUAL "") + # Environment always wins: + SET(${_var} $ENV{${_var}}) + ENDIF() IF(NOT "${_var}" STREQUAL "") SET(${_var} "${${_var}}" CACHE STRING "") ENDIF() diff --git a/deal.II/doc/developers/testsuite.html b/deal.II/doc/developers/testsuite.html index 9e0de43e32..fc2e429c10 100644 --- a/deal.II/doc/developers/testsuite.html +++ b/deal.II/doc/developers/testsuite.html @@ -187,23 +187,12 @@

- Alternatively, you can also set them as CMake variables when - configuring the build directory: -
-
-    $ cmake -DTEST_PICKUP_REGEX="<regular expression>" .
-      
- The variables will be passed down to the subprojects. A variable set - via cmake always overrides one set via environment. -

-

Note: The subprojects cache these options (regardless of set via environment variables or as cmake variable). So, if you want to - disable an option again, you have to explicitly set it to an empty - string. Furthermore, if you have set the option as a CMake variable - in the build directory configuration you have to overwrite it in the - build directory cache. + disable an option again, you have to either explicitly set it to an + empty string or first remove the subprojects via + make prune_tests.