From: Matthias Maier Date: Thu, 30 Mar 2023 16:24:24 +0000 (-0500) Subject: CMake: use new macros also in deal_ii_setup_target() X-Git-Tag: v9.5.0-rc1~392^2~2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb2fc2633ed117f2f1d96e319d7b73bb078b49a1;p=dealii.git CMake: use new macros also in deal_ii_setup_target() --- diff --git a/cmake/config/CMakeLists.txt b/cmake/config/CMakeLists.txt index 5642088e91..7482f6f8c1 100644 --- a/cmake/config/CMakeLists.txt +++ b/cmake/config/CMakeLists.txt @@ -49,6 +49,8 @@ set(_macros ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_query_git_information.cmake ${CMAKE_SOURCE_DIR}/cmake/macros/macro_deal_ii_setup_target.cmake ${CMAKE_SOURCE_DIR}/cmake/macros/macro_shell_escape_option_groups.cmake + ${CMAKE_SOURCE_DIR}/cmake/macros/macro_target_compile_flags.cmake + ${CMAKE_SOURCE_DIR}/cmake/macros/macro_target_link_flags.cmake ) file(COPY ${_macros} DESTINATION ${CMAKE_BINARY_DIR}/${DEAL_II_SHARE_RELDIR}/macros diff --git a/cmake/macros/macro_deal_ii_setup_target.cmake b/cmake/macros/macro_deal_ii_setup_target.cmake index 7efd8083d7..2070cad6eb 100644 --- a/cmake/macros/macro_deal_ii_setup_target.cmake +++ b/cmake/macros/macro_deal_ii_setup_target.cmake @@ -90,21 +90,15 @@ macro(deal_ii_setup_target _target) set(_build "RELEASE") endif() - separate_arguments(_compile_options UNIX_COMMAND + target_compile_flags(${_target} PRIVATE "$" "${DEAL_II_WARNING_FLAGS} ${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}" ) - shell_escape_option_groups(_compile_options) - target_compile_options(${_target} PRIVATE - $<$:${_compile_options}> - ) get_property(_type TARGET ${_target} PROPERTY TYPE) if(NOT "${_type}" STREQUAL "OBJECT_LIBRARY") - separate_arguments(_link_options UNIX_COMMAND + target_link_flags(${_target} PRIVATE "${DEAL_II_LINKER_FLAGS} ${DEAL_II_LINKER_FLAGS_${_build}}" ) - shell_escape_option_groups(_link_options) - target_link_options(${_target} PRIVATE ${_link_options}) endif() target_link_libraries(${_target} ${DEAL_II_TARGET_${_build}})