]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Remove most of the COMPILE_LANGUAGE generator expressions
authorMatthias Maier <tamiko@43-1.org>
Fri, 10 Mar 2023 20:06:12 +0000 (14:06 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 17 Mar 2023 12:44:54 +0000 (07:44 -0500)
cmake/macros/macro_deal_ii_setup_target.cmake
cmake/macros/macro_define_interface_target.cmake
cmake/macros/macro_insource_setup_target.cmake
cmake/macros/macro_populate_target_properties.cmake

index 3c41999f09ffefdc2d004061dbf54d9d6ab52821..807fcfa9acc22a6bb082a19a6724f57cbaf14e63 100644 (file)
@@ -105,7 +105,7 @@ macro(deal_ii_setup_target _target)
       )
     shell_escape_option_groups(_link_options)
     target_link_options(${_target} PRIVATE
-      $<$<COMPILE_LANGUAGE:CXX>:${_link_options}>
+      $<$<LINK_LANGUAGE:CXX>:${_link_options}>
       )
   endif()
 
index f0444761b82b8e891c27f38385a5d1b7285de42c..6cd70cf8d84652667ffbab6f5f0eb3c8dd671440 100644 (file)
@@ -117,7 +117,7 @@ function(define_interface_target _feature)
     shell_escape_option_groups(_compile_options)
     if(NOT "${_compile_options}" STREQUAL "")
       message(STATUS "    COMPILE_OPTIONS:     ${_compile_options}")
-      target_compile_options(${_interface_target} INTERFACE $<$<COMPILE_LANGUAGE:CXX>:${_compile_options}>)
+      target_compile_options(${_interface_target} INTERFACE ${_compile_options})
     endif()
 
     separate_arguments(_link_options UNIX_COMMAND
@@ -126,7 +126,7 @@ function(define_interface_target _feature)
     shell_escape_option_groups(_link_options)
     if(NOT "${_link_options}" STREQUAL "")
       message(STATUS "    LINK_OPTIONS:        ${_link_options}")
-      target_link_options(${_interface_target} INTERFACE $<$<COMPILE_LANGUAGE:CXX>:${_link_options}>)
+      target_link_options(${_interface_target} INTERFACE ${_link_options})
     endif()
 
     export(TARGETS ${_interface_target}
index fb67006e382ae1bffe1f5a9e5965ff73f40a2859..f6449755161b024ed8f1204dda9d1beacbb824cf 100644 (file)
@@ -35,9 +35,7 @@ function(insource_setup_target _target _build)
     "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
     )
   shell_escape_option_groups(_compile_options)
-  target_compile_options(${_target} PRIVATE
-    $<$<COMPILE_LANGUAGE:CXX>:${_compile_options}>
-    )
+  target_compile_options(${_target} PRIVATE ${_compile_options})
 
   get_property(_type TARGET ${_target} PROPERTY TYPE)
   if(NOT "${_type}" STREQUAL "OBJECT_LIBRARY")
@@ -45,9 +43,7 @@ function(insource_setup_target _target _build)
       "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
       )
     shell_escape_option_groups(_link_options)
-    target_link_options(${_target} PRIVATE
-      $<$<COMPILE_LANGUAGE:CXX>:${_link_options}>
-      )
+    target_link_options(${_target} PRIVATE ${_link_options})
   endif()
 
   target_include_directories(${_target}
index 7c086fb1502807de339cd173f75757bb21d03f8e..df990a9dbdb9505490571701f0908cca363d89a5 100644 (file)
@@ -96,9 +96,7 @@ function(populate_target_properties _target _build)
     "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}"
     )
   shell_escape_option_groups(_compile_options)
-  target_compile_options(${_target} PRIVATE
-    $<$<COMPILE_LANGUAGE:CXX>:${_compile_options}>
-    )
+  target_compile_options(${_target} PRIVATE ${_compile_options})
 
   get_property(_type TARGET ${_target} PROPERTY TYPE)
   if(NOT "${_type}" STREQUAL "OBJECT_LIBRARY")
@@ -106,9 +104,7 @@ function(populate_target_properties _target _build)
       "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
       )
     shell_escape_option_groups(_link_options)
-    target_link_options(${_target} PRIVATE
-      $<$<COMPILE_LANGUAGE:CXX>:${_link_options}>
-      )
+    target_link_options(${_target} PRIVATE ${_link_options})
   endif()
 
   target_link_libraries(${_target} ${_visibility}

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.