Author: akhaldi
Date: Mon Jun 15 18:59:46 2015
New Revision: 68154
URL:
http://svn.reactos.org/svn/reactos?rev=68154&view=rev
Log:
[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.
Modified:
trunk/reactos/cmake/gcc.cmake
Modified: trunk/reactos/cmake/gcc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=68154&…
==============================================================================
--- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Mon Jun 15 18:59:46 2015
@@ -129,20 +129,25 @@
endif()
# Optimizations
-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")
+# FIXME: Revisit this to see if we even need these levels
+if(CMAKE_BUILD_TYPE STREQUAL "Release")
add_compile_flags("-O3")
-elseif(OPTIMIZE STREQUAL "7")
- add_compile_flags("-Ofast")
+else()
+ 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()
# Link-time code generation