Changeset 7520 for code/branches/ois_update/cmake
- Timestamp:
- Oct 11, 2010, 12:29:16 PM (14 years ago)
- Location:
- code/branches/ois_update/cmake
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/ois_update/cmake/CompilerConfigGCC.cmake
r7518 r7520 26 26 INCLUDE(FlagUtilities) 27 27 INCLUDE(CompareVersionStrings) 28 INCLUDE(CheckCXXCompilerFlag) 28 29 29 30 # Shortcut for CMAKE_COMPILER_IS_GNUCXX and ..._GNUC … … 64 65 65 66 # CMake doesn't seem to set the PIC flags right on certain 64 bit systems 67 # Todo: MinGW too? 66 68 IF(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64") 67 69 ADD_COMPILER_FLAGS("-fPIC" CACHE) 68 70 ENDIF() 71 72 # Use SSE if possible 73 #CHECK_CXX_COMPILER_FLAG(-msse _gcc_have_sse) 74 #IF(_gcc_have_sse) 75 # ADD_COMPILER_FLAGS("-msse" CACHE) 76 #ENDIF() 77 78 IF(NOT MINGW) 79 # Have GCC visibility? 80 CHECK_CXX_COMPILER_FLAG("-fvisibility=hidden" _gcc_have_visibility) 81 IF(_gcc_have_visibility) 82 # Note: There is a possible bug with the flag in gcc < 4.2 and Debug versions 83 COMPARE_VERSION_STRINGS("${GCC_VERSION}" "4.2.0" _compare_result) 84 IF(NOT CMAKE_BUILD_TYPE STREQUAL "Debug" OR _compare_result SMALLER GREATER -1) 85 ADD_COMPILER_FLAGS("-DORXONOX_GCC_VISIBILITY -fvisibility=hidden -fvisibility-inlines-hidden" CACHE) 86 ENDIF() 87 ENDIF(_have_gcc_visibility) 88 ENDIF(NOT MINGW) 69 89 70 90 # We have some unconformant code, disable an optimisation feature -
code/branches/ois_update/cmake/CompilerConfigMSVC.cmake
r7440 r7520 71 71 72 72 # Overwrite CMake default flags here for the individual configurations 73 SET_COMPILER_FLAGS("-MDd -Od -Zi -D_DEBUG -RTC1" Debug CACHE) 74 SET_COMPILER_FLAGS("-MD -O2 -DNDEBUG" Release CACHE) 75 SET_COMPILER_FLAGS("-MD -O2 -Zi -DNDEBUG" RelWithDebInfo CACHE) 76 SET_COMPILER_FLAGS("-MD -O1 -DNDEBUG" MinSizeRel CACHE) 77 ADD_COMPILER_FLAGS("-D_SECURE_SCL=0" MSVC9 ReleaseAll CACHE) 73 SET_COMPILER_FLAGS("-MDd -Od -Oi -Zi -D_DEBUG -RTC1" Debug CACHE) 74 SET_COMPILER_FLAGS("-MD -O2 -DNDEBUG" Release CACHE) 75 SET_COMPILER_FLAGS("-MD -O2 -Zi -DNDEBUG" RelWithDebInfo CACHE) 76 SET_COMPILER_FLAGS("-MD -O1 -DNDEBUG" MinSizeRel CACHE) 77 ADD_COMPILER_FLAGS("-D_SECURE_SCL=0" MSVC9 ReleaseAll CACHE) 78 79 # Enable non standard floating point optimisations 80 # Note: It hasn't been checked yet whether we have code that might break 81 #ADD_COMPILER_FLAGS("-fp:fast" CACHE) 78 82 79 83 # Use Link time code generation for Release config if ORXONOX_RELEASE is defined
Note: See TracChangeset
for help on using the changeset viewer.