[CMAKE] Use a separate set for the optimization level in GCC release builds. We should revisit this to see if we need this rbuild era block nowadays.

svn path=/trunk/; revision=68154
This commit is contained in:
Amine Khaldi 2015-06-15 18:59:46 +00:00
parent ef6a028073
commit f8effe197f

View file

@ -129,6 +129,10 @@ elseif(ARCH STREQUAL "arm")
endif()
# Optimizations
# FIXME: Revisit this to see if we even need these levels
if(CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_flags("-O3")
else()
if(OPTIMIZE STREQUAL "1")
add_compile_flags("-Os -ftracer")
elseif(OPTIMIZE STREQUAL "2")
@ -144,6 +148,7 @@ elseif(OPTIMIZE STREQUAL "6")
elseif(OPTIMIZE STREQUAL "7")
add_compile_flags("-Ofast")
endif()
endif()
# Link-time code generation
if(LTCG)