From: Matthias Maier Date: Tue, 29 Nov 2022 05:56:16 +0000 (-0600) Subject: CMake: Update insource_setup_target() macro, unify target naming X-Git-Tag: v9.5.0-rc1~446^2~27 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=601e8fa4c85e41d9dcbeaa2c8a87cb5f6157dd66;p=dealii.git CMake: Update insource_setup_target() macro, unify target naming --- diff --git a/cmake/macros/macro_insource_setup_target.cmake b/cmake/macros/macro_insource_setup_target.cmake index 8a956bc2e4..09faaddc7c 100644 --- a/cmake/macros/macro_insource_setup_target.cmake +++ b/cmake/macros/macro_insource_setup_target.cmake @@ -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()