Changeset 3117 for code/branches/pch
- Timestamp:
- Jun 3, 2009, 8:40:17 PM (15 years ago)
- Location:
- code/branches/pch
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/pch/cmake/BuildConfigGCC.cmake
r3116 r3117 43 43 ENDIF() 44 44 45 # GCC only supports PCH in versions 3.4 and above 46 INCLUDE(CompareVersionStrings) 47 COMPARE_VERSION_STRINGS("${GCC_VERSION}" "3.4.0" _compare_result) 48 IF(_compare_result GREATER -1) 49 SET(PCH_COMPILER_SUPPORT TRUE) 50 ENDIF() 51 45 52 # Also include environment flags. Could cause conflicts though 46 53 SET_COMPILER_FLAGS("$ENV{CXXFLAGS}" CXX CACHE) -
code/branches/pch/cmake/BuildConfigMSVC.cmake
r3116 r3117 37 37 OPTION(VISUAL_LEAK_DETECTOR_ENABLE "Memory leak detector" FALSE) 38 38 ENDIF(MSVC80) 39 40 # Orxonox only supports MSVC 8 and above, which gets asserted above 41 SET(PCH_COMPILER_SUPPORT TRUE) 42 39 43 40 44 #################### Compiler Flags ##################### -
code/branches/pch/cmake/TargetUtilities.cmake
r3116 r3117 34 34 # STATIC/SHARED: Inherited from ADD_LIBRARY 35 35 # WIN32: Inherited from ADD_EXECUTABLE 36 # PCH_NO_DEFAULT: Do not make precompiled header files default if 37 # specified with PCH_FILE 36 38 # Lists: 37 39 # LINK_LIBRARIES: Redirects to TARGET_LINK_LIBRARIES … … 40 42 # DEFINE_SYMBOL: Sets the DEFINE_SYMBOL target property 41 43 # TOLUA_FILES: Files with tolua interface 44 # PCH_FILE: Precompiled header file 45 # PCH_EXCLUDE: Source files to be excluded from PCH support 42 46 # Note: 43 47 # This function also installs the target! … … 52 56 INCLUDE(ParseMacroArguments) 53 57 INCLUDE(SourceFileUtilities) 58 IF(PCH_COMPILER_SUPPORT) 59 INCLUDE(PrecompiledHeaderFiles) 60 ENDIF() 54 61 55 62 FUNCTION(ORXONOX_ADD_LIBRARY _target_name) … … 67 74 # Specify all possible options (either switch or with add. arguments) 68 75 SET(_switches FIND_HEADER_FILES EXCLUDE_FROM_ALL ORXONOX_EXTERNAL 69 NO_DLL_INTERFACE NO_SOURCE_GROUPS ${_additional_switches}) 76 NO_DLL_INTERFACE NO_SOURCE_GROUPS ${_additional_switches} 77 PCH_NO_DEFAULT) 70 78 SET(_list_names LINK_LIBRARIES VERSION SOURCE_FILES DEFINE_SYMBOL 71 TOLUA_FILES )79 TOLUA_FILES PCH_FILE PCH_EXCLUDE) 72 80 PARSE_MACRO_ARGUMENTS("${_switches}" "${_list_names}" ${ARGN}) 73 81 … … 101 109 GENERATE_TOLUA_BINDINGS(${_target_name_capitalised} _${_target_name}_files 102 110 INPUTFILES ${_arg_TOLUA_FILES}) 111 ENDIF() 112 113 # First part (pre target) of precompiled header files 114 IF(PCH_COMPILER_SUPPORT AND _arg_PCH_FILE) 115 # Provide convenient option to control PCH 116 STRING(TOUPPER "${_target_name}" _target_name_upper) 117 IF(_arg_PCH_NO_DEFAULT) 118 SET(PCH_DEFAULT FALSE) 119 ELSE() 120 SET(PCH_DEFAULT TRUE) 121 ENDIF() 122 OPTION(PCH_ENABLE_${_target_name_upper} "Enable using precompiled header files for library ${_target_name}." ${PCH_DEFAULT}) 123 124 IF(PCH_ENABLE_${_target_name_upper}) 125 PRECOMPILED_HEADER_FILES_PRE_TARGET(${_target_name} ${_arg_PCH_FILE} _${_target_name}_files EXCLUDE ${_arg_PCH_EXCLUDE}) 126 ENDIF() 103 127 ENDIF() 104 128 … … 144 168 ENDIF() 145 169 170 # Second part of precompiled header files 171 IF(PCH_COMPILER_SUPPORT AND PCH_ENABLE_${_target_name_upper} AND _arg_PCH_FILE) 172 PRECOMPILED_HEADER_FILES_POST_TARGET(${_target_name} ${_arg_PCH_FILE}) 173 ENDIF() 174 146 175 IF(NOT _arg_STATIC) 147 176 INSTALL(TARGETS ${_target_name} -
code/branches/pch/src/orxonox/CMakeLists.txt
r3116 r3117 41 41 objects/quest/QuestDescription.h 42 42 objects/quest/QuestManager.h 43 PCH_FILE 44 OrxonoxPrecompiledHeaders.h 45 PCH_NO_DEFAULT 43 46 LINK_LIBRARIES 44 47 ${OGRE_LIBRARY}
Note: See TracChangeset
for help on using the changeset viewer.