Changeset 8368 for code/trunk/cmake/CompilerConfigMSVC.cmake
- Timestamp:
- May 1, 2011, 3:09:28 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/cmake/CompilerConfigMSVC.cmake
r8362 r8368 40 40 # additionally for CXX: -EHsc -GR 41 41 # We keep these flags but reset the build specific flags 42 SET_COMPILER_FLAGS("" Debug Rel WithDebInfo Release MinSizeRel CACHE)42 SET_COMPILER_FLAGS("" Debug RelForDevs RelWithDebInfo Release MinSizeRel CACHE) 43 43 44 44 # Make sure we define all the possible macros for identifying Windows … … 51 51 ADD_COMPILER_FLAGS("-MP" CACHE) 52 52 53 # Always generate debug symbols (there is really no reason not to)54 ADD_COMPILER_FLAGS("-Zi" CACHE)55 56 53 # Never omit frame pointers to avoid useless stack traces (the performance 57 54 # loss is almost not measurable) … … 62 59 # Set build specific flags. 63 60 # -MD[d] Multithreaded [debug] shared MSVC runtime library 61 # -Zi Generate debug symbols 64 62 # -O[d|2|1] No optimisations, optimise for speed, optimise for size 65 63 # -Oi[-] Use or disable use of intrinisic functions 66 64 # -GL Link time code generation (see -LTCG in linker flags) 67 65 # -RTC1 Both basic runtime checks 68 ADD_COMPILER_FLAGS("-MDd -Od -Oi -D_DEBUG -RTC1" Debug CACHE) 69 ADD_COMPILER_FLAGS("-MD -O2 -Oi -DNDEBUG" RelWithDebInfo CACHE) 70 ADD_COMPILER_FLAGS("-MD -O2 -Oi -DNDEBUG -GL" Release CACHE) 71 ADD_COMPILER_FLAGS("-MD -O1 -Oi- -DNDEBUG -GL" MinSizeRel CACHE) 66 ADD_COMPILER_FLAGS("-MDd -Zi -Od -Oi -D_DEBUG -RTC1" Debug CACHE) 67 ADD_COMPILER_FLAGS("-MD -Zi -O2 -Oi -DNDEBUG" RelForDevs CACHE) 68 ADD_COMPILER_FLAGS("-MD -Zi -O2 -Oi -DNDEBUG -GL" RelWithDebInfo CACHE) 69 ADD_COMPILER_FLAGS("-MD -O2 -Oi -DNDEBUG -GL" Release CACHE) 70 ADD_COMPILER_FLAGS("-MD -O1 -Oi- -DNDEBUG -GL" MinSizeRel CACHE) 72 71 73 72 … … 120 119 # CMake default flags: -MANIFEST -STACK:10000000 -machine:I386 121 120 # We keep these flags but reset the build specific flags 122 SET_LINKER_FLAGS("" Debug RelWithDebInfo Release MinSizeRel CACHE) 123 124 # Always generate debug symbols (there is really no reason not to) 125 ADD_LINKER_FLAGS("-DEBUG" CACHE) 121 SET_LINKER_FLAGS("" Debug RelForDevs RelWithDebInfo Release MinSizeRel CACHE) 126 122 127 123 # Never fold multiple functions into a single one because we might compare … … 132 128 ADD_LINKER_FLAGS("-OPT:NOWIN98" MSVC80 CACHE) 133 129 130 # Generate debug symbols 131 ADD_LINKER_FLAGS("-DEBUG" Debug RelForDevs RelWithDebInfo CACHE) 132 134 133 # Incremental linking speeds up development builds 135 ADD_LINKER_FLAGS("-INCREMENTAL:YES" Debug Rel WithDebInfoCACHE)136 ADD_LINKER_FLAGS("-INCREMENTAL:NO" Release MinSizeRelCACHE)134 ADD_LINKER_FLAGS("-INCREMENTAL:YES" Debug RelForDevs CACHE) 135 ADD_LINKER_FLAGS("-INCREMENTAL:NO" Release RelWithDebInfo MinSizeRel CACHE) 137 136 138 137 # Eliminate unreferenced data 139 ADD_LINKER_FLAGS("-OPT:REF" Release MinSizeRel CACHE)138 ADD_LINKER_FLAGS("-OPT:REF" Release RelWithDebInfo MinSizeRel CACHE) 140 139 141 140 # Link time code generation can improve run time performance at the cost of 142 141 # hugely increased link time (the total build time is about the same though) 143 ADD_LINKER_FLAGS("-LTCG" Release MinSizeRel CACHE)142 ADD_LINKER_FLAGS("-LTCG" Release RelWithDebInfo MinSizeRel CACHE)
Note: See TracChangeset
for help on using the changeset viewer.