Set optimisation flags for RelwithDebInfo

Ensure we use-O3 for AppImage (RelWithDebInfo) builds
This commit is contained in:
Automatic Release Builder 2020-09-27 11:15:28 +01:00
parent afad224ca0
commit 4d905135e8

View File

@ -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)