]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Export compile definitions for dependent targets 16834/head
authorRene Gassmoeller <rene.gassmoeller@mailbox.org>
Mon, 1 Apr 2024 21:32:54 +0000 (17:32 -0400)
committerRene Gassmoeller <rene.gassmoeller@mailbox.org>
Tue, 2 Apr 2024 14:26:28 +0000 (10:26 -0400)
cmake/config/Config.cmake.in
cmake/macros/macro_deal_ii_setup_target.cmake
cmake/macros/macro_insource_setup_target.cmake

index 77f305e738e5a91e5ff1b58e727b57f79b865cee..4601b27c8a7ffda058cc5832332dc84d1ca89441 100644 (file)
@@ -124,6 +124,14 @@ set(DEAL_II_LINKER_FLAGS_DEBUG "@DEAL_II_LINKER_FLAGS_DEBUG@")
 # _additionally_ used for release targets:
 set(DEAL_II_LINKER_FLAGS_RELEASE "@DEAL_II_LINKER_FLAGS_RELEASE@")
 
+# used for all targets:
+set(DEAL_II_DEFINITIONS "@DEAL_II_DEFINITIONS@")
+
+# _additionally_ used for debug targets:
+set(DEAL_II_DEFINITIONS_DEBUG "@DEAL_II_DEFINITIONS_DEBUG@")
+
+# _additionally_ used for release targets:
+set(DEAL_II_DEFINITIONS_RELEASE "@DEAL_II_DEFINITIONS_RELEASE@")
 #
 # MPI runtime:
 #
index 4024eed9568fa7e768547d19cd2fd3de4c8c4547..a8192949e13041215f7cb1c6db92d8567c624d38 100644 (file)
@@ -93,6 +93,10 @@ macro(deal_ii_setup_target _target)
     "${DEAL_II_WARNING_FLAGS} ${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
     )
 
+  target_compile_definitions(${_target} PRIVATE
+    ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}}
+    )
+
   get_property(_type TARGET ${_target} PROPERTY TYPE)
   if(NOT "${_type}" STREQUAL "OBJECT_LIBRARY")
     target_link_flags(${_target} PRIVATE
index c037ac0a460f6ed1ad106ad013b1ccb4f28a9f43..db2ac168e0c44f9b383b15fc9df5ce342a6a363d 100644 (file)
@@ -34,6 +34,10 @@ function(insource_setup_target _target _build)
     "${DEAL_II_WARNING_FLAGS} ${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
     )
 
+  target_compile_definitions(${_target} PRIVATE
+    ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}}
+    )
+
   get_property(_type TARGET ${_target} PROPERTY TYPE)
   if(NOT "${_type}" STREQUAL "OBJECT_LIBRARY")
     target_link_flags(${_target} PRIVATE

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.