]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Do not pollute deal.IIConfig.cmake
authorMatthias Maier <tamiko@43-1.org>
Tue, 12 Jul 2016 19:38:43 +0000 (14:38 -0500)
committerMatthias Maier <tamiko@43-1.org>
Wed, 13 Jul 2016 13:51:03 +0000 (08:51 -0500)
Do not pollute deal.IIConfig.cmake with bogus details about unconfigured
features.

cmake/config/CMakeLists.txt

index d96cc86fab62bc7012050fb4d497dd4af1894739..d13e81be96067e021f4bdd9f7fa0f4f168ea9c0c 100644 (file)
@@ -187,9 +187,17 @@ LIST(SORT _deal_ii_features_sorted)
 FOREACH(_name ${_deal_ii_features_sorted})
   SET(_var DEAL_II_WITH_${_name})
 
+  #
+  # Do not pollute deal.IIConfig.cmake with package details of unconfigured
+  # features.
+  #
+  IF(NOT ${_var})
+    CONTINUE()
+  ENDIF()
+
   FOREACH(_file ${_files})
     FILE(APPEND ${_file} "SET(${_var} ${${_var}})\n")
-    IF(${_var} AND NOT "${${_name}_VERSION}" STREQUAL "")
+    IF(NOT "${${_name}_VERSION}" STREQUAL "")
       FILE(APPEND ${_file}
         "SET(DEAL_II_${_name}_VERSION \"${${_name}_VERSION}\")\n"
         )

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.