Changeset 8368 for code/trunk
- Timestamp:
- May 1, 2011, 3:09:28 AM (14 years ago)
- Location:
- code/trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/CMakeLists.txt
r8363 r8368 92 92 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_SOURCE_DIR}/cmake/tools) 93 93 94 # Set Debug build to default when not having multi-config generator like msvc 94 # Flag variables for extra configuration "RelForDevs" should be hidden 95 MARK_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 95 103 IF(NOT CMAKE_CONFIGURATION_TYPES) 104 # Set Debug build to default when not having multi-config generator like MSVC or XCODE 96 105 IF(NOT CMAKE_BUILD_TYPE) 97 106 SET(CMAKE_BUILD_TYPE Debug CACHE STRING 98 "Build types are: Debug, Rel ease, MinSizeRel, RelWithDebInfo" FORCE)107 "Build types are: Debug, RelForDevs, RelWithDebInfo, Release, MinSizeRel" FORCE) 99 108 ENDIF() 100 109 MARK_AS_ADVANCED(CLEAR CMAKE_BUILD_TYPE) … … 102 111 MESSAGE(STATUS "*** Build type is ${CMAKE_BUILD_TYPE} ***") 103 112 ELSE() 113 # Make sure no build type is ever set 104 114 IF(CMAKE_BUILD_TYPE) 105 115 SET(CMAKE_BUILD_TYPE CACHE STRING FORCE) 106 116 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) 108 121 ENDIF() 109 122 -
code/trunk/cmake/CompilerConfigGCC.cmake
r8364 r8368 52 52 SET_COMPILER_FLAGS(" -g -ggdb -D_DEBUG" Debug CACHE) 53 53 SET_COMPILER_FLAGS(" -DNDEBUG" ReleaseAll CACHE) 54 ADD_COMPILER_FLAGS("-O2 -g -ggdb" RelForDevs CACHE) 55 ADD_COMPILER_FLAGS("-O3 -g -ggdb" RelWithDebInfo CACHE) 54 56 ADD_COMPILER_FLAGS("-O3" Release CACHE) 55 ADD_COMPILER_FLAGS("-O2 -g -ggdb" RelWithDebInfo CACHE)56 57 ADD_COMPILER_FLAGS("-Os" MinSizeRel CACHE) 57 58 … … 112 113 # Add compiler and linker flags for MinGW 113 114 IF (MINGW) 114 ADD_COMPILER_FLAGS("-gstabs+" Debug CACHE) 115 ADD_COMPILER_FLAGS("-gstabs+" RelWithDebInfo CACHE) 115 ADD_COMPILER_FLAGS("-gstabs+" Debug RelForDevs RelWithDebInfo CACHE) 116 116 117 117 ADD_LINKER_FLAGS("-enable-auto-import" CACHE) -
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) -
code/trunk/cmake/PackageConfig.cmake
r8351 r8368 81 81 FILES ${DEP_BINARY_DIR}/${_file} 82 82 DESTINATION bin 83 CONFIGURATIONS Rel ease RelWithDebInfo MinSizeRel83 CONFIGURATIONS RelForDevs Release RelWithDebInfo MinSizeRel 84 84 ) 85 85 ENDFOREACH(_file) … … 90 90 DIRECTORY ${DEP_BINARY_DIR}/ 91 91 DESTINATION bin 92 CONFIGURATIONS Rel ease RelWithDebInfo MinSizeRel92 CONFIGURATIONS RelForDevs Release RelWithDebInfo MinSizeRel 93 93 REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE 94 94 ) -
code/trunk/cmake/PackageConfigOSX.cmake
r8351 r8368 98 98 DIRECTORY ${DEP_BINARY_DIR}/ 99 99 DESTINATION bin 100 CONFIGURATIONS Rel ease RelWithDebInfo MinSizeRel100 CONFIGURATIONS RelForDevs Release RelWithDebInfo MinSizeRel 101 101 REGEX "_[Dd]\\.[a-zA-Z0-9+-]+$|-mt-gd-|^.*\\.pdb$" EXCLUDE 102 102 ) -
code/trunk/cmake/tools/FlagUtilities.cmake
r7163 r8368 22 22 # Description: 23 23 # Sets the compiler/linker flags. After the flags you can specify more args: 24 # Release, Debug, RelWithDebInfo, MinSizeRel : Build configs (inclusive)24 # Release, Debug, RelWithDebInfo, MinSizeRel, RelForDevs: Build configs 25 25 # ReleaseAll: Sets the flags of all three release builds 26 26 # CACHE: Values are witten with SET_CACHE_ADVANCED … … 36 36 # REMOVE_COMPILER_FLAGS("/Gm "asdf" -q"test -foo" CXX ReleaseAll NOT UNIX) 37 37 # This will only remove the CXX (C++) flags on a non Unix system for the 38 # Release, RelWithDebInfo and MinSizeRel configurations. The macros should39 # be able to cope with "test -foo" as string argument for a flag.38 # Release, RelWithDebInfo, MinSizeRel, RelForDevs configurations. The macros 39 # should be able to cope with "test -foo" as string argument for a flag. 40 40 # 41 41 … … 89 89 IF(_arg MATCHES "${_key_regex}") 90 90 LIST(APPEND _langs "${_arg}") 91 ELSEIF( _arg MATCHES "^(Debug|Release|MinSizeRel|RelWithDebInfo )$"92 OR _arg MATCHES "^(DEBUG|RELEASE|MINSIZEREL|RELWITHDEBINFO )$")91 ELSEIF( _arg MATCHES "^(Debug|Release|MinSizeRel|RelWithDebInfo|RelForDevs)$" 92 OR _arg MATCHES "^(DEBUG|RELEASE|MINSIZEREL|RELWITHDEBINFO|RelForDevs)$") 93 93 STRING(TOUPPER "${_arg}" _upper_arg) 94 94 LIST(APPEND _build_types ${_upper_arg}) 95 95 ELSEIF(_arg STREQUAL "ReleaseAll") 96 LIST(APPEND _build_types RELEASE MINSIZEREL RELWITHDEBINFO )96 LIST(APPEND _build_types RELEASE MINSIZEREL RELWITHDEBINFO RELFORDEVS) 97 97 ELSEIF(_arg STREQUAL "CACHE") 98 98 SET(_write_to_cache TRUE) -
code/trunk/src/OrxonoxConfig.cmake
r8363 r8368 75 75 # about the active one we have to define the macro for each configuration 76 76 ADD_COMPILER_FLAGS("-DCMAKE_Debug_BUILD" Debug) 77 ADD_COMPILER_FLAGS("-DCMAKE_RelForDevs_BUILD" RelForDevs) 77 78 ADD_COMPILER_FLAGS("-DCMAKE_Release_BUILD" Release) 78 79 ADD_COMPILER_FLAGS("-DCMAKE_RelWithDebInfo_BUILD" RelWithDebInfo) -
code/trunk/src/OrxonoxConfig.h.in
r8363 r8368 179 179 */ 180 180 181 // Configurations Release and MinSizeRel are designed for redistribution while182 // RelWithDebInfo is more for development181 // Configurations Release, RelWithDebInfo and MinSizeRel are designed for 182 // redistribution while RelForDevs is for development purposes 183 183 // ORXONOX_RELEASE simplifies this a little bit 184 #if defined(CMAKE_Release_BUILD) || defined(CMAKE_MinSizeRel_BUILD) 184 #if defined(CMAKE_Release_BUILD) || defined(CMAKE_MinSizeRel_BUILD) \ 185 || defined(CMAKE_RelWithDebInfo_BUILD) 185 186 # define ORXONOX_RELEASE 186 187 #endif -
code/trunk/src/orxonox-main.vcproj.user.in
r7420 r8368 8 8 <Configuration 9 9 Name="Debug|${MSVC_PLATFORM}" 10 > 11 <DebugSettings 12 WorkingDirectory="${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/$(OutDir)" 13 Environment="PATH=${RUNTIME_LIBRARY_DIRECTORY};%PATH%" 14 EnvironmentMerge="true" 15 /> 16 </Configuration> 17 <Configuration 18 Name="RelForDevs|${MSVC_PLATFORM}" 10 19 > 11 20 <DebugSettings -
code/trunk/src/orxonox-main.vcxproj.user.in
r8351 r8368 2 2 <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 3 3 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|${MSVC_PLATFORM}'"> 4 <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> 5 <LocalDebuggerEnvironment>PATH=${RUNTIME_LIBRARY_DIRECTORY};%PATH%</LocalDebuggerEnvironment> 6 <LocalDebuggerWorkingDirectory>$(Outdir)</LocalDebuggerWorkingDirectory> 7 </PropertyGroup> 8 <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='RelForDevs|${MSVC_PLATFORM}'"> 4 9 <DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor> 5 10 <LocalDebuggerEnvironment>PATH=${RUNTIME_LIBRARY_DIRECTORY};%PATH%</LocalDebuggerEnvironment>
Note: See TracChangeset
for help on using the changeset viewer.