#
# Pick up values from environment:
#
-SET_IF_EMPTY(DEAL_II_BINARY_DIR $ENV{DEAL_II_BINARY_DIR})
-SET_IF_EMPTY(DEAL_II_BINARY_DIR $ENV{DEAL_II_DIR})
-SET_IF_EMPTY(DEAL_II_SOURCE_DIR $ENV{DEAL_II_SOURCE_DIR})
-SET_IF_EMPTY(TEST_DIFF $ENV{TEST_DIFF})
-SET_IF_EMPTY(TEST_TIME_LIMIT $ENV{TEST_TIME_LIMIT})
-SET_IF_EMPTY(TEST_PICKUP_REGEX $ENV{TEST_PICKUP_REGEX})
-SET_IF_EMPTY(TEST_OVERRIDE_LOCATION $ENV{TEST_OVERRIDE_LOCATION})
+FOREACH(_var
+ DEAL_II_BINARY_DIR
+ DEAL_II_SOURCE_DIR
+ TEST_DIFF
+ TEST_TIME_LIMIT
+ TEST_PICKUP_REGEX
+ TEST_OVERRIDE_LOCATION
+ )
+ SET_IF_EMPTY(${_var} $ENV{${_var}})
+ IF(NOT "${_var}" STREQUAL "")
+ SET(_var "${_var}" CACHE STRING "")
+ ENDIF()
+ENDFOREACH()
#
# We need deal.II and Perl as external packages:
TEST_PICKUP_REGEX
TEST_TIME_LIMIT
)
- LIST(APPEND _options "-U${_var}")
IF(DEFINED ${_var})
LIST(APPEND _options "-D${_var}=${${_var}}")
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