From a99e3e2d6cacf1fa0e7c9b62a51b0a5fc24ea9f5 Mon Sep 17 00:00:00 2001 From: Deukhoofd Date: Sat, 12 Mar 2022 10:33:16 +0100 Subject: [PATCH] Fixes GCC build --- CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0495f4f..4895eb2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,13 +32,15 @@ if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") add_compile_options(-fconcepts) endif () -if (CMAKE_BUILD_TYPE MATCHES Release AND NOT WINDOWS) - # Include debug symbols in all linux builds - message("Including debug symbols") - add_compile_options(-g -gline-tables-only) +if (CMAKE_BUILD_TYPE MATCHES Release) + if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") + # Include debug symbols in all linux builds + message("Including debug symbols") + add_compile_options(-g -gline-tables-only) + endif () + # FIXME: Add debug symbols for GCC endif () - set(THREADS_PREFER_PTHREAD_FLAG ON) find_package(Threads REQUIRED)