Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2011, 10:40:10 PM (14 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
Files:
9 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
  • code/branches/unity_build/src/external/bullet/BulletCollision/CMakeLists.txt

    r8558 r8653  
    11ADD_SOURCE_FILES(BULLET_FILES
    2 
    3 BUILD_UNIT BulletCollisionBuildUnit.cpp
    42
    53        BroadphaseCollision/btAxisSweep3.cpp
     
    8482        NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
    8583        NarrowPhaseCollision/btPersistentManifold.cpp
     84        NarrowPhaseCollision/btPolyhedralContactClipping.cpp
    8685        NarrowPhaseCollision/btRaycastCallback.cpp
    8786        NarrowPhaseCollision/btSubSimplexConvexCast.cpp
    8887        NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
    8988
    90 END_BUILD_UNIT
    91 
    92     # Raises compiler errors when compiled inside the build unit
    93         NarrowPhaseCollision/btPolyhedralContactClipping.cpp
    9489
    9590        # Headers
  • code/branches/unity_build/src/external/bullet/BulletDynamics/CMakeLists.txt

    r8558 r8653  
    11ADD_SOURCE_FILES(BULLET_FILES
    2 
    3 BUILD_UNIT BulletDynamicsBuildUnit.cpp
    42
    53        Character/btKinematicCharacterController.cpp
     
    2523        Vehicle/btRaycastVehicle.cpp
    2624        Vehicle/btWheelInfo.cpp
    27 
    28 END_BUILD_UNIT
    2925
    3026        # Headers
  • code/branches/unity_build/src/external/bullet/CMakeLists.txt

    r8393 r8653  
    3232  VERSION
    3333    2.78
     34  EXCLUDE_FROM_BUILD_UNITS
     35    BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
    3436  SOURCE_FILES
    3537    ${BULLET_FILES}
  • code/branches/unity_build/src/external/bullet/LinearMath/CMakeLists.txt

    r8558 r8653  
    11ADD_SOURCE_FILES(BULLET_FILES
    22
    3 BUILD_UNIT BulletLinearMathBuildUnit.cpp
    43        btAlignedAllocator.cpp
    54        btConvexHull.cpp
     
    87        btQuickprof.cpp
    98        btSerializer.cpp
    10 END_BUILD_UNIT
    119
    1210        # Headers
  • code/branches/unity_build/src/external/ogreceguirenderer/CMakeLists.txt

    r8558 r8653  
    2323  OgreCEGUITexture.h
    2424
    25 BUILD_UNIT OgreCEGUIRendererBuildUnit.cpp
    2625  OgreCEGUIRenderer.cpp
    2726  OgreCEGUIResourceProvider.cpp
    2827  OgreCEGUITexture.cpp
    29 END_BUILD_UNIT
    3028)
    3129
  • code/branches/unity_build/src/external/ois/CMakeLists.txt

    r8625 r8653  
    3434  OISObject.h
    3535  OISPrereqs.h
    36 )
    3736
    38 # Put everything into one single build unit (doens't work on OS X though)
    39 IF(NOT APPLE)
    40   ADD_SOURCE_FILES(OIS_FILES BUILD_UNIT OISBuildUnit.cpp)
    41 ENDIF()
    42 
    43 ADD_SOURCE_FILES(OIS_FILES
    4437  OISEffect.cpp
    4538  OISException.cpp
     
    5043  OISObject.cpp
    5144)
     45
    5246IF(WIN32)
    5347  ADD_SUBDIRECTORY(win32)
     
    5852ENDIF()
    5953
    60 # Close build unit from above
    61 IF(NOT APPLE)
    62   ADD_SOURCE_FILES(OIS_FILES END_BUILD_UNIT)
    63 ENDIF()
    64 
    6554# MinGW doesn't come with some required Windows headers
    6655IF(MINGW)
    6756  INCLUDE_DIRECTORIES(${WMI_INCLUDE_DIR})
     57ENDIF()
     58
     59# Apple has problems with OIS and build units
     60IF(APPLE)
     61  SET(USE_BUILD_UNITS NO_BUILD_UNITS)
    6862ENDIF()
    6963
     
    8276  LINK_LIBS_LINUX
    8377    X11
     78  ${USE_BUILD_UNITS}
    8479  SOURCE_FILES
    8580    ${OIS_FILES}
  • code/branches/unity_build/src/external/tinyxml/CMakeLists.txt

    r8558 r8653  
    2424  tinyxml.h
    2525
    26 BUILD_UNIT TicppBuildUnit.cpp
    2726  ticpp.cpp
    2827  tinystr.cpp
     
    3029  tinyxmlerror.cpp
    3130  tinyxmlparser.cpp
    32 END_BUILD_UNIT
    3331)
    3432
Note: See TracChangeset for help on using the changeset viewer.