From 2fe882ae62dbb998c80e1ea1100776c82847988b Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Thu, 30 Mar 2023 12:43:51 -0500 Subject: [PATCH] CMake: use new macro when setting up dealii::dealii target --- source/CMakeLists.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index e64c371549..ae4930bd03 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -82,11 +82,10 @@ add_subdirectory(arborx) # add_library(${DEAL_II_TARGET_NAME} INTERFACE) -separate_arguments(_compile_options UNIX_COMMAND "${DEAL_II_CXX_FLAGS}") -shell_escape_option_groups(_compile_options) -target_compile_options(${DEAL_II_TARGET_NAME} INTERFACE - $<$:${_compile_options}> +target_compile_flags(${DEAL_II_TARGET_NAME} INTERFACE + "$" "${DEAL_II_CXX_FLAGS}" ) +target_link_flags(${DEAL_II_TARGET_NAME} INTERFACE "${DEAL_II_LINKER_FLAGS}") foreach(build ${DEAL_II_BUILD_TYPES}) string(TOLOWER ${build} build_lowercase) @@ -145,12 +144,12 @@ foreach(build ${DEAL_II_BUILD_TYPES}) RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR}" ) - separate_arguments(_compile_options UNIX_COMMAND + target_compile_flags(${DEAL_II_TARGET_NAME} INTERFACE + "$,$>" "${DEAL_II_CXX_FLAGS_${build}}" ) - shell_escape_option_groups(_compile_options) - target_compile_options(${DEAL_II_TARGET_NAME} INTERFACE - "$<$:$<$:${_compile_options}>>" + target_link_flags(${DEAL_II_TARGET_NAME} INTERFACE + "$" "${DEAL_II_LINKER_FLAGS_${build}}" ) if(CMAKE_SYSTEM_NAME MATCHES "Darwin") -- 2.39.5