diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d60b8510..a7a95d2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,15 @@ endif() include(CMakeDetermineCCompiler) include(CMakeDetermineCXXCompiler) + +if(CMAKE_COMPILER_IS_GNUCXX AND NOT __otr_compile_flags_set) + set(__otr_compile_flags_set TRUE CACHE INTERNAL "" FORCE) + foreach(i C CXX) + set(CMAKE_${i}_FLAGS_RELEASE "-O3 -march=native" CACHE STRING "" FORCE) + set(CMAKE_${i}_FLAGS "-ggdb -Wall -Wextra -Wpedantic" CACHE STRING "" FORCE) + endforeach() +endif() + include(CMakeParseArguments) include(opentrack-load-user-settings) |