From 787350ffc964500f8a319af67a26d9ab9172069c Mon Sep 17 00:00:00 2001 From: Rene Gassmoeller Date: Fri, 25 Oct 2024 09:57:25 +0200 Subject: [PATCH] Separate additional CXX arguments --- CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index efc327e375d..7fdf3753198 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -292,7 +292,8 @@ if(ASPECT_WITH_WORLD_BUILDER) set(WB_TARGET "WorldBuilderDebug") add_subdirectory("${WORLD_BUILDER_SOURCE_DIR}" ${CMAKE_BINARY_DIR}/world_builder/) - target_compile_options(WorldBuilderDebug PRIVATE "-g" "${ASPECT_ADDITIONAL_CXX_FLAGS}") + separate_arguments(SEPARATED_FLAGS NATIVE_COMMAND ${ASPECT_ADDITIONAL_CXX_FLAGS}) + target_compile_options(WorldBuilderDebug PRIVATE "-g" "${SEPARATED_FLAGS}") set(CMAKE_BUILD_TYPE ${_build_type}) endif() @@ -308,7 +309,9 @@ if(ASPECT_WITH_WORLD_BUILDER) set(WB_TARGET "WorldBuilderRelease") add_subdirectory("${WORLD_BUILDER_SOURCE_DIR}" ${CMAKE_BINARY_DIR}/world_builder_release/) target_compile_definitions(WorldBuilderRelease PUBLIC "NDEBUG") - target_compile_options(WorldBuilderRelease PRIVATE "-O3" "${ASPECT_ADDITIONAL_CXX_FLAGS}") + + separate_arguments(SEPARATED_FLAGS NATIVE_COMMAND ${ASPECT_ADDITIONAL_CXX_FLAGS}) + target_compile_options(WorldBuilderRelease PRIVATE "-O3" "${SEPARATED_FLAGS}") set(CMAKE_BUILD_TYPE ${_build_type}) endif()