From c3680553b9ae0eef197d40086786083bbb11dc50 Mon Sep 17 00:00:00 2001 From: Adam Dempsey Date: Thu, 6 Feb 2025 10:44:59 -0700 Subject: [PATCH] Force -03 in RelWithDebInfo --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5077f46..5b50286 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,6 +25,10 @@ option(ARTEMIS_ENABLE_OPENMP "Enable OpenMP for artemis and parthenon" OFF) option(ARTEMIS_ENABLE_COMPILE_TIMING "Enable timing of compilation of artemis" ON) option(ARTEMIS_ENABLE_ASAN "Enable AddressSanitizer to detect memory errors" OFF) +# Force -03 optimization for RelWithDebInfo +set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG" CACHE STRING "Force -O3 in RelWithDebInfo mode" FORCE) +set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG" CACHE STRING "Force -O3 in RelWithDebInfo mode" FORCE) + # Timing of compilation if (ARTEMIS_ENABLE_COMPILE_TIMING) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE