Author: akhaldi
Date: Sat May 23 10:34:25 2015
New Revision: 67861
URL:
http://svn.reactos.org/svn/reactos?rev=67861&view=rev
Log:
[CMAKE] Fix and improve the Release build type of the MSVC builds.
Modified:
trunk/reactos/cmake/msvc.cmake
Modified: trunk/reactos/cmake/msvc.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/msvc.cmake?rev=67861…
==============================================================================
--- trunk/reactos/cmake/msvc.cmake [iso-8859-1] (original)
+++ trunk/reactos/cmake/msvc.cmake [iso-8859-1] Sat May 23 10:34:25 2015
@@ -2,6 +2,11 @@
#if(${CMAKE_BUILD_TYPE} STREQUAL "Debug")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# no optimization
+ add_compile_flags("/Ob0 /Od")
+elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
+ add_compile_flags("/Ox /Ob2 /Ot /Oy /GT /GF")
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /OPT:REF /OPT:ICF")
+ set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /OPT:REF
/OPT:ICF")
elseif(OPTIMIZE STREQUAL "1")
add_definitions(/O1)
elseif(OPTIMIZE STREQUAL "2")
@@ -76,10 +81,9 @@
if(NOT (_PREFAST_ OR _VS_ANALYZE_))
add_compile_flags("/Zi")
endif()
- add_compile_flags("/Ob0 /Od")
#elseif(${CMAKE_BUILD_TYPE} STREQUAL "Release")
elseif(CMAKE_BUILD_TYPE STREQUAL "Release")
- add_compile_flags("/Ob2 /D NDEBUG")
+ add_definitions("/D NDEBUG")
endif()
if(MSVC_IDE AND (NOT DEFINED USE_FOLDER_STRUCTURE))