]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Update insource_setup_target() macro, unify target naming
authorMatthias Maier <tamiko@43-1.org>
Tue, 29 Nov 2022 05:56:16 +0000 (23:56 -0600)
committerMatthias Maier <tamiko@43-1.org>
Fri, 17 Mar 2023 12:44:53 +0000 (07:44 -0500)
cmake/macros/macro_insource_setup_target.cmake

index 8a956bc2e4ee12d3c73a91050fc5750c7fce1447..09faaddc7c21afba88460f1125b12d21b224bca2 100644 (file)
@@ -27,7 +27,6 @@ function(insource_setup_target _target _build)
   string(TOLOWER ${_build} _build_lowercase)
 
   set_target_properties(${_target} PROPERTIES
-    LINK_FLAGS "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}"
     LINKER_LANGUAGE "CXX"
     RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}"
     )
@@ -36,27 +35,10 @@ function(insource_setup_target _target _build)
     PRIVATE
       "${CMAKE_BINARY_DIR}/include"
       "${CMAKE_SOURCE_DIR}/include"
+    SYSTEM PRIVATE
+      ${DEAL_II_BUNDLED_INCLUDE_DIRS}
+      ${DEAL_II_INCLUDE_DIRS}
     )
-  target_include_directories(${_target}
-    SYSTEM PRIVATE ${DEAL_II_INCLUDE_DIRS} ${DEAL_II_BUNDLED_INCLUDE_DIRS}
-    )
-
-  set(_flags "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}")
-
-  # Make sure some CUDA warning flags don't get deduplicated
-  string(REGEX REPLACE "(-Xcudafe --diag_suppress=[^ ]+)" "\"SHELL:\\1\"" _flags ${_flags})
-
-  separate_arguments(_flags UNIX_COMMAND ${_flags})
-
-  target_compile_options(${_target} PUBLIC ${_flags})
-
-  target_compile_definitions(${_target}
-    PUBLIC ${DEAL_II_DEFINITIONS} ${DEAL_II_DEFINITIONS_${_build}}
-    )
-
-  get_property(_type TARGET ${_target} PROPERTY TYPE)
-  if(NOT "${_type}" STREQUAL "OBJECT_LIBRARY")
-    target_link_libraries(${_target} ${DEAL_II_NAMESPACE}_${_build_lowercase})
-  endif()
 
+  target_link_libraries(${_target} ${DEAL_II_NAMESPACE}_${_build_lowercase})
 endfunction()

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.