aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNadia Holmquist Pedersen <nadia@nhp.sh>2023-12-08 17:27:06 +0100
committerNadia Holmquist Pedersen <nadia@nhp.sh>2023-12-08 17:27:06 +0100
commit890a66c0eb245d77e168ef2b45b9adb90815d487 (patch)
tree2fdf8e84596b243aafe55dce33b1edd7b66ebac5
parent5dac65f52e7e420e8d8a488368c7c8a7f6c6fe18 (diff)
I'm sick of this interfering with debugging
-rw-r--r--CMakeLists.txt7
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 598b3bd..337c4a1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,8 +73,11 @@ if (ENABLE_LTO)
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
endif()
-set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Og")
-set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
+if (CMAKE_CXX_COMPILER_ID STREQUAL GNU)
+ set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Og")
+ set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
+endif()
+
string(REPLACE "-O2" "-O3" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
string(REPLACE "-O2" "-O3" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")