Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5691


Ignore:
Timestamp:
Aug 29, 2009, 10:05:55 PM (15 years ago)
Author:
rgrieder
Message:

Enable link time code generation for visual studio if ORXONOX_RELEASE is enabled. This creates slightly faster and especially much less (about half) code.

Location:
code/branches/resource2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/resource2/CMakeLists.txt

    r5664 r5691  
    8989ENDIF()
    9090
     91# Enable expensive optimisations: use this for a binary release build
     92OPTION(ORXONOX_RELEASE "Enable when building restributable releases" FALSE)
     93
    9194########### Subfolders and Subscripts ###########
    9295
  • code/branches/resource2/cmake/CompilerConfigMSVC.cmake

    r5664 r5691  
    7575SET_COMPILER_FLAGS("-MD  -O1     -DNDEBUG -MP2"      MinSizeRel     CACHE)
    7676
    77 # Microsoft unfortunately couldn't integrate a fix issued while VS 2008 beta 2
    78 # was being tested into the final release even though a fix existed...
    79 # And it's actually quite a big issue, you simple can't compile anything.
    80 # Fortunately for us, disabling Minimal Rebuild solves the problem.
    81 REMOVE_COMPILER_FLAGS("-Gm" Debug MSVC09 CACHE)
    82 # And since we have to remove /Gm, let's add /MP2 to speed things up
    83 ADD_COMPILER_FLAGS("-MP2" Debug MSVC09 CACHE)
     77# Use Link time code generation for Release config if ORXONOX_RELEASE is defined
     78IF(ORXONOX_RELEASE)
     79  ADD_COMPILER_FLAGS("-GL" ReleaseAll CACHE)
     80ENDIF()
    8481
    8582
     
    149146ADD_LINKER_FLAGS("-OPT:REF -OPT:ICF" Release MinSizeRel CACHE)
    150147ADD_LINKER_FLAGS("-OPT:NOWIN98" MSVC80 CACHE)
     148
     149# Use Link time code generation for Release config if ORXONOX_RELEASE is defined
     150IF(ORXONOX_RELEASE)
     151  ADD_LINKER_FLAGS("-LTCG" ReleaseAll CACHE)
     152ENDIF()
  • code/branches/resource2/src/OrxonoxConfig.cmake

    r5664 r5691  
    3838  OPTION(PCH_ENABLE "Global PCH switch" TRUE)
    3939ENDIF()
    40 
    41 # Enable expensive optimisations: use this for a binary release build
    42 OPTION(ORXONOX_RELEASE "Enable when building restributable releases" FALSE)
    4340
    4441# Use WinMain() or main()?
Note: See TracChangeset for help on using the changeset viewer.