Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 1, 2011, 3:09:28 AM (14 years ago)
Author:
rgrieder
Message:

Added CMake configuration type "RelForDevs", which replaces "RelWithDebInfo". That latter is now equivalent to "Release", but with symbols.
Also, I removed debug symbol generation for Release and MinSizeRel when compiling with MSVC.

The new configuration should be used as standard Release mode when developing. The other three release configurations are for actual installed binaries (and behave again as the name suggests).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/cmake/CompilerConfigMSVC.cmake

    r8362 r8368  
    4040# additionally for CXX: -EHsc -GR
    4141# We keep these flags but reset the build specific flags
    42 SET_COMPILER_FLAGS("" Debug RelWithDebInfo Release MinSizeRel CACHE)
     42SET_COMPILER_FLAGS("" Debug RelForDevs RelWithDebInfo Release MinSizeRel CACHE)
    4343
    4444# Make sure we define all the possible macros for identifying Windows
     
    5151ADD_COMPILER_FLAGS("-MP" CACHE)
    5252
    53 # Always generate debug symbols (there is really no reason not to)
    54 ADD_COMPILER_FLAGS("-Zi" CACHE)
    55 
    5653# Never omit frame pointers to avoid useless stack traces (the performance
    5754# loss is almost not measurable)
     
    6259# Set build specific flags.
    6360# -MD[d]    Multithreaded [debug] shared MSVC runtime library
     61# -Zi       Generate debug symbols
    6462# -O[d|2|1] No optimisations, optimise for speed, optimise for size
    6563# -Oi[-]    Use or disable use of intrinisic functions
    6664# -GL       Link time code generation (see -LTCG in linker flags)
    6765# -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)
     66ADD_COMPILER_FLAGS("-MDd -Zi -Od -Oi  -D_DEBUG -RTC1" Debug          CACHE)
     67ADD_COMPILER_FLAGS("-MD  -Zi -O2 -Oi  -DNDEBUG"       RelForDevs     CACHE)
     68ADD_COMPILER_FLAGS("-MD  -Zi -O2 -Oi  -DNDEBUG -GL"   RelWithDebInfo CACHE)
     69ADD_COMPILER_FLAGS("-MD      -O2 -Oi  -DNDEBUG -GL"   Release        CACHE)
     70ADD_COMPILER_FLAGS("-MD      -O1 -Oi- -DNDEBUG -GL"   MinSizeRel     CACHE)
    7271
    7372
     
    120119# CMake default flags: -MANIFEST -STACK:10000000 -machine:I386
    121120# 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)
     121SET_LINKER_FLAGS("" Debug RelForDevs RelWithDebInfo Release MinSizeRel CACHE)
    126122
    127123# Never fold multiple functions into a single one because we might compare
     
    132128ADD_LINKER_FLAGS("-OPT:NOWIN98" MSVC80 CACHE)
    133129
     130# Generate debug symbols
     131ADD_LINKER_FLAGS("-DEBUG" Debug RelForDevs RelWithDebInfo CACHE)
     132
    134133# Incremental linking speeds up development builds
    135 ADD_LINKER_FLAGS("-INCREMENTAL:YES" Debug   RelWithDebInfo CACHE)
    136 ADD_LINKER_FLAGS("-INCREMENTAL:NO"  Release MinSizeRel    CACHE)
     134ADD_LINKER_FLAGS("-INCREMENTAL:YES" Debug   RelForDevs                CACHE)
     135ADD_LINKER_FLAGS("-INCREMENTAL:NO"  Release RelWithDebInfo MinSizeRel CACHE)
    137136
    138137# Eliminate unreferenced data
    139 ADD_LINKER_FLAGS("-OPT:REF" Release MinSizeRel CACHE)
     138ADD_LINKER_FLAGS("-OPT:REF" Release RelWithDebInfo MinSizeRel CACHE)
    140139
    141140# Link time code generation can improve run time performance at the cost of
    142141# hugely increased link time (the total build time is about the same though)
    143 ADD_LINKER_FLAGS("-LTCG" Release MinSizeRel CACHE)
     142ADD_LINKER_FLAGS("-LTCG" Release RelWithDebInfo MinSizeRel CACHE)
Note: See TracChangeset for help on using the changeset viewer.