Skip to content

Commit

Permalink
Merge pull request #6111 from gassmoeller/enable_multiple_additional_…
Browse files Browse the repository at this point in the history
…flags

Separate additional CXX arguments
  • Loading branch information
tjhei authored Oct 25, 2024
2 parents af19ae9 + 787350f commit 08d2d0d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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()
Expand Down

0 comments on commit 08d2d0d

Please sign in to comment.