]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Introduce _set_cache_variable
authorDaniel Arndt <arndtd@ornl.gov>
Fri, 21 Apr 2023 12:42:59 +0000 (08:42 -0400)
committerDaniel Arndt <arndtd@ornl.gov>
Fri, 21 Apr 2023 12:42:59 +0000 (08:42 -0400)
cmake/setup_finalize.cmake

index 20600b39525e0051394a30678008d4196e2df596..dea53bff1493cbcc9949216e5d77bb7fb262b9a2 100644 (file)
@@ -64,6 +64,11 @@ foreach(build ${DEAL_II_BUILD_TYPES})
       )
   endmacro()
 
+  macro(_set_cache_variable _variable _value)
+    set(${_variable} ${_value} CACHE INTERNAL "" FORCE)
+    set(${_variable} ${_value})
+  endmacro()
+
   macro(_drop_linker_flag _linker_flag _replacement_flag _variable)
     message(STATUS
       "Unable to compile a simple test program. "
@@ -77,8 +82,7 @@ foreach(build ${DEAL_II_BUILD_TYPES})
         ${_flags} "${${_flags}}"
         )
     endforeach()
-    set(${_variable} FALSE CACHE INTERNAL "" FORCE)
-    set(${_variable} FALSE)
+    _set_cache_variable(_variable FALSE)
   endmacro()
 
   _check_linker_flags()

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.