From: Matthias Maier Date: Thu, 2 Mar 2023 13:31:22 +0000 (-0600) Subject: CMake: Bugfix, also propagate cxx flags to insource targets X-Git-Tag: v9.5.0-rc1~446^2~17 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5fb94fc118d694c03031a6a80379c63ad5499e84;p=dealii.git CMake: Bugfix, also propagate cxx flags to insource targets --- diff --git a/cmake/macros/macro_insource_setup_target.cmake b/cmake/macros/macro_insource_setup_target.cmake index 09faaddc7c..c76f55dc24 100644 --- a/cmake/macros/macro_insource_setup_target.cmake +++ b/cmake/macros/macro_insource_setup_target.cmake @@ -31,6 +31,13 @@ function(insource_setup_target _target _build) RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" ) + separate_arguments(_compile_options UNIX_COMMAND + "${DEAL_II_CXX_FLAGS} ${DEAL_II_CXX_FLAGS_${_build}}" + ) + target_compile_options(${_target} PRIVATE + $<$:${_compile_options}> + ) + target_include_directories(${_target} PRIVATE "${CMAKE_BINARY_DIR}/include"