Changeset 8368 for code/trunk/cmake
- Timestamp:
- May 1, 2011, 3:09:28 AM (14 years ago)
- Location:
- code/trunk/cmake
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
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)
Note: See TracChangeset
for help on using the changeset viewer.