From 4d905135e8918be7cdf9f66d94fcf35c908a183f Mon Sep 17 00:00:00 2001 From: Automatic Release Builder Date: Sun, 27 Sep 2020 11:15:28 +0100 Subject: [PATCH] Set optimisation flags for RelwithDebInfo Ensure we use-O3 for AppImage (RelWithDebInfo) builds --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index ccd3107a..57a1d89b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -433,6 +433,10 @@ if(CMAKE_COMPILER_IS_GNUCXX) check_cxx_source_compiles( "int main() { unsigned mValue; return __sync_add_and_fetch(&mValue, 1); }" GCC_ATOMIC_BUILTINS_FOUND) + + # override CMake default RelWithDebInfo flags. + set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O3 -g -DNDEBUG") endif(CMAKE_COMPILER_IS_GNUCXX) if (CLANG)