]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Bugfix: Initialize optional languages on subsequent cmake runs, too.
authormaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Aug 2013 23:39:48 +0000 (23:39 +0000)
committermaier <maier@0785d39b-7218-0410-832d-ea1e28bc413d>
Thu, 1 Aug 2013 23:39:48 +0000 (23:39 +0000)
git-svn-id: https://svn.dealii.org/trunk@30216 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/cmake/macros/macro_enable_language_optional.cmake

index 885b960f8c47e52b43a83210f6d029ca3b19fe8b..fccb978ae428c08c9b4a1fe79ae2d41712476a1d 100644 (file)
 #
 
 MACRO(ENABLE_LANGUAGE_OPTIONAL _language)
-  #
-  # Run this check exactly once:
-  #
   IF(NOT ${_language}_CHECKED)
+    #
+    # Run this check exactly once:
+    #
     SET(${_language}_CHECKED TRUE CACHE INTERNAL "" FORCE)
 
     SET(_tmp ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/${_language}_test)
@@ -58,9 +58,17 @@ MACRO(ENABLE_LANGUAGE_OPTIONAL _language)
       )
 
     IF("${_result}" STREQUAL "0")
+      SET(DEAL_II_${_language}_COMPILER_WORKS TRUE CACHE INTERNAL "" FORCE)
       ENABLE_LANGUAGE(${_language})
     ELSE()
       MESSAGE(STATUS "No working ${_language} compiler found, disabling ${_language}")
     ENDIF()
+  ELSE()
+    #
+    # Enable the language depending on the cached result from a former run:
+    #
+    IF(DEAL_II_${_language}_COMPILER_WORKS)
+      ENABLE_LANGUAGE(${_language})
+    ENDIF()
   ENDIF()
 ENDMACRO()

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.