]> https://gitweb.dealii.org/ - dealii.git/commitdiff
define_interface_target: guard link options with generator expression 14508/head
authorMatthias Maier <tamiko@43-1.org>
Tue, 24 Jan 2023 01:10:01 +0000 (19:10 -0600)
committerMatthias Maier <tamiko@43-1.org>
Tue, 24 Jan 2023 01:10:01 +0000 (19:10 -0600)
cmake/macros/macro_define_interface_target.cmake

index eca2afe37f16219c0c08c41cc931ebb1a9042be1..396b1cc75378c7abe8e1f80945263925ecdf4110 100644 (file)
@@ -120,7 +120,7 @@ function(define_interface_target _feature)
       )
     if(NOT "${_link_options}" STREQUAL "")
       message(STATUS "    LINK_OPTIONS:        ${_link_options}")
-      target_link_options(${_interface_target} INTERFACE ${_link_options})
+      target_link_options(${_interface_target} INTERFACE $<$<COMPILE_LANGUAGE:CXX>:${_link_options}>)
     endif()
 
     export(TARGETS ${_interface_target}

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.