diff --git a/CMakeLists.txt b/CMakeLists.txt index cae27c3b..adc99e8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,9 +31,9 @@ if (CMAKE_C_COMPILER_ID MATCHES "Clang") set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -ggdb") add_compile_options(-Werror -Wall -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -Qunused-arguments -Wno-deprecated-declarations) elseif(CMAKE_C_COMPILER_ID MATCHES "GNU") - set(CMAKE_C_FLAGS_RELEASE -O2) + set(CMAKE_C_FLAGS_RELEASE "-O2 -fpeel-loops") set(CMAKE_C_FLAGS_DEBUG "-O0 -ggdb") - set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -ggdb") + set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -fpeel-loops -ggdb") add_compile_options(-Werror -Wall -Wno-unused-parameter -Wno-unused-function -Wno-missing-braces -Wno-error=unknown-pragmas -Wno-error=pragmas -Wno-deprecated-declarations) elseif(CMAKE_C_COMPILER_ID MATCHES "MSVC") add_definitions(-D_CRT_SECURE_NO_WARNINGS)