Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 1, 2011, 3:09:28 AM (13 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/CMakeLists.txt

    r8363 r8368  
    9292SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_SOURCE_DIR}/cmake/tools)
    9393
    94 # Set Debug build to default when not having multi-config generator like msvc
     94# Flag variables for extra configuration "RelForDevs" should be hidden
     95MARK_AS_ADVANCED(
     96  CMAKE_CXX_FLAGS_RELFORDEVS
     97  CMAKE_C_FLAGS_RELFORDEVS
     98  CMAKE_EXE_LINKER_FLAGS_RELFORDEVS
     99  CMAKE_MODULE_LINKER_FLAGS_RELFORDEVS
     100  CMAKE_SHARED_LINKER_FLAGS_RELFORDEVS
     101)
     102
    95103IF(NOT CMAKE_CONFIGURATION_TYPES)
     104  # Set Debug build to default when not having multi-config generator like MSVC or XCODE
    96105  IF(NOT CMAKE_BUILD_TYPE)
    97106    SET(CMAKE_BUILD_TYPE Debug CACHE STRING
    98         "Build types are: Debug, Release, MinSizeRel, RelWithDebInfo" FORCE)
     107        "Build types are: Debug, RelForDevs, RelWithDebInfo, Release, MinSizeRel" FORCE)
    99108  ENDIF()
    100109  MARK_AS_ADVANCED(CLEAR CMAKE_BUILD_TYPE)
     
    102111  MESSAGE(STATUS "*** Build type is ${CMAKE_BUILD_TYPE} ***")
    103112ELSE()
     113  # Make sure no build type is ever set
    104114  IF(CMAKE_BUILD_TYPE)
    105115    SET(CMAKE_BUILD_TYPE CACHE STRING FORCE)
    106116  ENDIF()
    107   MARK_AS_ADVANCED(CMAKE_BUILD_TYPE)
     117  MARK_AS_ADVANCED(FORCE CMAKE_BUILD_TYPE)
     118  # Add our extra configuration "RelForDevs"
     119  SET(CMAKE_CONFIGURATION_TYPES "Debug;RelForDevs;RelWithDebInfo;Release;MinSizeRel"
     120      CACHE STRING "Semicolon separated list of supported configuration types." FORCE)
    108121ENDIF()
    109122
Note: See TracChangeset for help on using the changeset viewer.