From f68a5e6ccf3bb847cc3365a9a1f4d0f318990156 Mon Sep 17 00:00:00 2001
From: patrick96
Date: Tue, 9 Apr 2019 00:30:49 +0200
Subject: [PATCH] build: Add build type specific flags to -vvv
---
include/CMakeLists.txt | 2 +-
include/settings.hpp.cmake | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt
index 2e9b91fa..20bce72a 100644
--- a/include/CMakeLists.txt
+++ b/include/CMakeLists.txt
@@ -27,7 +27,7 @@ string(REPLACE ";" ", " XPP_EXTENSION_LIST "${XPP_EXTENSION_LIST}")
configure_file(
${CMAKE_CURRENT_LIST_DIR}/settings.hpp.cmake
${CMAKE_BINARY_DIR}/generated-sources/settings.hpp
- ESCAPE_QUOTES @ONLY)
+ ESCAPE_QUOTES)
list(APPEND dirs ${CMAKE_BINARY_DIR}/generated-sources/)
set(APP_VERSION ${APP_VERSION} PARENT_SCOPE)
diff --git a/include/settings.hpp.cmake b/include/settings.hpp.cmake
index f86af49b..34713b0d 100644
--- a/include/settings.hpp.cmake
+++ b/include/settings.hpp.cmake
@@ -118,8 +118,8 @@ const auto print_build_info = [](bool extended = false) {
printf("\n");
printf("Build type: @CMAKE_BUILD_TYPE@\n");
printf("Compiler: @CMAKE_CXX_COMPILER@\n");
- printf("Compiler flags: @CMAKE_CXX_FLAGS@\n");
- printf("Linker flags: @CMAKE_EXE_LINKER_FLAGS@\n");
+ printf("Compiler flags: @CMAKE_CXX_FLAGS@ ${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE_UPPER}}\n");
+ printf("Linker flags: @CMAKE_EXE_LINKER_FLAGS@ ${CMAKE_EXE_LINKER_FLAGS_${CMAKE_BUILD_TYPE_UPPER}}\n");
}
};
// clang-format on