mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 21:38:43 +00:00
[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:
parent
ef6a028073
commit
f8effe197f
1 changed files with 18 additions and 13 deletions
|
@ -129,20 +129,25 @@ elseif(ARCH STREQUAL "arm")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Optimizations
|
# Optimizations
|
||||||
if(OPTIMIZE STREQUAL "1")
|
# FIXME: Revisit this to see if we even need these levels
|
||||||
add_compile_flags("-Os -ftracer")
|
if(CMAKE_BUILD_TYPE STREQUAL "Release")
|
||||||
elseif(OPTIMIZE STREQUAL "2")
|
|
||||||
add_compile_flags("-Os")
|
|
||||||
elseif(OPTIMIZE STREQUAL "3")
|
|
||||||
add_compile_flags("-Og")
|
|
||||||
elseif(OPTIMIZE STREQUAL "4")
|
|
||||||
add_compile_flags("-O1")
|
|
||||||
elseif(OPTIMIZE STREQUAL "5")
|
|
||||||
add_compile_flags("-O2")
|
|
||||||
elseif(OPTIMIZE STREQUAL "6")
|
|
||||||
add_compile_flags("-O3")
|
add_compile_flags("-O3")
|
||||||
elseif(OPTIMIZE STREQUAL "7")
|
else()
|
||||||
add_compile_flags("-Ofast")
|
if(OPTIMIZE STREQUAL "1")
|
||||||
|
add_compile_flags("-Os -ftracer")
|
||||||
|
elseif(OPTIMIZE STREQUAL "2")
|
||||||
|
add_compile_flags("-Os")
|
||||||
|
elseif(OPTIMIZE STREQUAL "3")
|
||||||
|
add_compile_flags("-Og")
|
||||||
|
elseif(OPTIMIZE STREQUAL "4")
|
||||||
|
add_compile_flags("-O1")
|
||||||
|
elseif(OPTIMIZE STREQUAL "5")
|
||||||
|
add_compile_flags("-O2")
|
||||||
|
elseif(OPTIMIZE STREQUAL "6")
|
||||||
|
add_compile_flags("-O3")
|
||||||
|
elseif(OPTIMIZE STREQUAL "7")
|
||||||
|
add_compile_flags("-Ofast")
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Link-time code generation
|
# Link-time code generation
|
||||||
|
|
Loading…
Reference in a new issue