Changeset 8653 for code/branches/unity_build/cmake/tools
- Timestamp:
- May 28, 2011, 10:40:10 PM (13 years ago)
- Location:
- code/branches/unity_build/cmake/tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/unity_build/cmake/tools/BuildUnits.cmake
r8649 r8653 50 50 # However we can specify different values in a config file 51 51 SET(_config ${BUILD_UNITS_CONFIG_${NR_OF_BUILD_UNITS}_THREADS}) 52 SET(_nr_of_units) 52 53 IF(_config) 53 54 LIST(FIND _config ${_target_name} _index) … … 59 60 ENDIF() 60 61 IF(NOT _nr_of_units) 61 # Use default 62 SET(_nr_of_units NR_OF_BUILD_UNITS) 62 # Use default as specified (e.g. "full4" --> 4) or 1 for externals 63 IF(_arg_ORXONOX_EXTERNAL) 64 SET(_nr_of_units 1) 65 ELSE() 66 SET(_nr_of_units ${NR_OF_BUILD_UNITS}) 67 ENDIF() 63 68 ENDIF() 64 69 … … 113 118 114 119 # Generate the filename 115 SET(_unit_file ${CMAKE_CURRENT_BINARY_DIR}/${_target_name}BuildUnit${_unit_nr}.cc) 120 IF(NOT _nr_of_units EQUAL 1) 121 SET(_suffix ${_unit_nr}) 122 ENDIF() 123 SET(_unit_file ${CMAKE_CURRENT_BINARY_DIR}/${_target_name}BuildUnit${_suffix}.cc) 116 124 # Only write if content has changed (avoids recompile) 117 125 IF(EXISTS ${_unit_file}) -
code/branches/unity_build/cmake/tools/TargetUtilities.cmake
r8650 r8653 40 40 # NO_INSTALL: Do not install the target at all 41 41 # NO_VERSION: Prevents adding any version to a target 42 # NO_BUILD_UNITS: Disables automatic (full) build units 42 43 # 43 44 # Lists: … … 91 92 SET(_switches FIND_HEADER_FILES EXCLUDE_FROM_ALL ORXONOX_EXTERNAL 92 93 NO_DLL_INTERFACE NO_SOURCE_GROUPS PCH_NO_DEFAULT 93 NO_INSTALL NO_VERSION ${_additional_switches}) 94 NO_INSTALL NO_VERSION NO_BUILD_UNITS 95 ${_additional_switches}) 94 96 SET(_list_names LINK_LIBRARIES VERSION SOURCE_FILES 95 97 DEFINE_SYMBOL TOLUA_FILES PCH_FILE … … 202 204 203 205 # Full build units 204 IF(NOT _arg_ORXONOX_EXTERNAL AND ENABLE_BUILD_UNITS MATCHES "full") 205 GENERATE_BUILD_UNITS(${_target_name} _${_target_name}_files) 206 IF(ENABLE_BUILD_UNITS AND NOT _arg_NO_BUILD_UNITS) 207 # Use full build units even in partial mode for externals 208 IF(ENABLE_BUILD_UNITS MATCHES "full" OR _arg_ORXONOX_EXTERNAL) 209 GENERATE_BUILD_UNITS(${_target_name} _${_target_name}_files) 210 ENDIF() 206 211 ENDIF() 207 212
Note: See TracChangeset
for help on using the changeset viewer.