From 38cae694f86abad05b650756091e2238c02baf72 Mon Sep 17 00:00:00 2001 From: Alexander Taepper Date: Wed, 7 Feb 2024 10:26:06 +0100 Subject: [PATCH] fix: Make C++ flags in CMake compatible for MacOS --- CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index f6a9b1f5d..c90aecc59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,6 +11,12 @@ set(CMAKE_CXX_FLAGS "-Wall") set(CMAKE_CXX_FLAGS_DEBUG "-g -fsanitize=address") set(CMAKE_CXX_FLAGS_RELEASE "-O3 -static-libstdc++ -static-libgcc") +# Work-around only for MacOS +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + set(CMAKE_CXX_FLAGS_DEBUG "-g") + set(CMAKE_CXX_FLAGS_RELEASE "-O3") +endif () + set(CMAKE_CXX_STANDARD 20) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/build/")