Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2011, 10:40:10 PM (13 years ago)
Author:
rgrieder
Message:

Since we already have it now: use automatic full build units for external dependencies, even in "partial" mode.
That will not actually change anything except that Bullet is now built in a single unit instead of 3.

Location:
code/branches/unity_build/cmake/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/unity_build/cmake/tools/BuildUnits.cmake

    r8649 r8653  
    5050  # However we can specify different values in a config file
    5151  SET(_config ${BUILD_UNITS_CONFIG_${NR_OF_BUILD_UNITS}_THREADS})
     52  SET(_nr_of_units)
    5253  IF(_config)
    5354    LIST(FIND _config ${_target_name} _index)
     
    5960  ENDIF()
    6061  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()
    6368  ENDIF()
    6469
     
    113118
    114119      # 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)
    116124      # Only write if content has changed (avoids recompile)
    117125      IF(EXISTS ${_unit_file})
  • code/branches/unity_build/cmake/tools/TargetUtilities.cmake

    r8650 r8653  
    4040 #      NO_INSTALL:        Do not install the target at all
    4141 #      NO_VERSION:        Prevents adding any version to a target
     42 #      NO_BUILD_UNITS:    Disables automatic (full) build units
    4243 #
    4344 #    Lists:
     
    9192  SET(_switches   FIND_HEADER_FILES  EXCLUDE_FROM_ALL  ORXONOX_EXTERNAL
    9293                  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})
    9496  SET(_list_names LINK_LIBRARIES     VERSION           SOURCE_FILES
    9597                  DEFINE_SYMBOL      TOLUA_FILES       PCH_FILE
     
    202204
    203205  # 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()
    206211  ENDIF()
    207212
Note: See TracChangeset for help on using the changeset viewer.