From 3c1ce804a0fed6023090c949720e6a5008e3db93 Mon Sep 17 00:00:00 2001 From: Pcornat Date: Thu, 20 Jan 2022 22:47:08 +0100 Subject: [PATCH] Tweaking --- CMakeLists.txt | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4cc551b..0b4b254 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -115,15 +115,15 @@ set(COMPILE_FLAGS -Wpedantic # -Wpadded -pedantic -# -ffunction-sections -# -fdata-sections + -ffunction-sections + -fdata-sections -fuse-ld=gold -funroll-loops -fdevirtualize-at-ltrans -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free ) set(LINKER_OPTIONS - -Wl,--sort-common,--as-needed#[[,--gc-sections,--strip-all]] + -Wl,--sort-common,--as-needed,--gc-sections,--strip-all -fuse-ld=gold -fdevirtualize-at-ltrans ) @@ -143,12 +143,15 @@ set_target_properties(BillySheet spdlog PROPERTIES INTERPROCEDURAL_OPTIMIZATION ON # UNITY_BUILD ON ) + +set_target_properties(spdlog PROPERTIES UNITY_BUILD ON) + set_target_properties(glfw PROPERTIES C_STANDARD 11 C_STANDARD_REQUIRED ON C_EXTENSIONS OFF INTERPROCEDURAL_OPTIMIZATION ON - UNITY_BUILD ON + UNITY_BUILD ON ) set_target_properties(spdlog PROPERTIES UNITY_BUILD ON) @@ -159,6 +162,14 @@ target_compile_definitions(BillySheet PRIVATE $<$:SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_DEBUG> $<$:SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_ERROR>) +target_compile_definitions(spdlog PRIVATE + $<$:_GLIBCXX_DEBUG> + $<$:SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_DEBUG> + $<$:SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_ERROR>) + +target_compile_definitions(glfw PRIVATE + $<$:_GLIBCXX_DEBUG>) + target_compile_options(spdlog PRIVATE ${COMPILE_FLAGS}) target_compile_options(glfw PRIVATE ${COMPILE_FLAGS}) target_compile_options(BillySheet PRIVATE ${COMPILE_FLAGS})