[Orxonox-commit 3979] r8653 - in code/branches/unity_build: cmake/tools src/external/bullet src/external/bullet/BulletCollision src/external/bullet/BulletDynamics src/external/bullet/LinearMath src/external/ogreceguirenderer src/external/ois src/external/tinyxml
rgrieder at orxonox.net
rgrieder at orxonox.net
Sat May 28 22:40:10 CEST 2011
Author: rgrieder
Date: 2011-05-28 22:40:10 +0200 (Sat, 28 May 2011)
New Revision: 8653
Modified:
code/branches/unity_build/cmake/tools/BuildUnits.cmake
code/branches/unity_build/cmake/tools/TargetUtilities.cmake
code/branches/unity_build/src/external/bullet/BulletCollision/CMakeLists.txt
code/branches/unity_build/src/external/bullet/BulletDynamics/CMakeLists.txt
code/branches/unity_build/src/external/bullet/CMakeLists.txt
code/branches/unity_build/src/external/bullet/LinearMath/CMakeLists.txt
code/branches/unity_build/src/external/ogreceguirenderer/CMakeLists.txt
code/branches/unity_build/src/external/ois/CMakeLists.txt
code/branches/unity_build/src/external/tinyxml/CMakeLists.txt
Log:
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.
Modified: code/branches/unity_build/cmake/tools/BuildUnits.cmake
===================================================================
--- code/branches/unity_build/cmake/tools/BuildUnits.cmake 2011-05-28 20:31:50 UTC (rev 8652)
+++ code/branches/unity_build/cmake/tools/BuildUnits.cmake 2011-05-28 20:40:10 UTC (rev 8653)
@@ -49,6 +49,7 @@
# Get number of build units we have to make. The default is NR_OF_BUILD_UNITS
# However we can specify different values in a config file
SET(_config ${BUILD_UNITS_CONFIG_${NR_OF_BUILD_UNITS}_THREADS})
+ SET(_nr_of_units)
IF(_config)
LIST(FIND _config ${_target_name} _index)
IF(NOT _index EQUAL -1)
@@ -58,8 +59,12 @@
ENDIF()
ENDIF()
IF(NOT _nr_of_units)
- # Use default
- SET(_nr_of_units NR_OF_BUILD_UNITS)
+ # Use default as specified (e.g. "full4" --> 4) or 1 for externals
+ IF(_arg_ORXONOX_EXTERNAL)
+ SET(_nr_of_units 1)
+ ELSE()
+ SET(_nr_of_units ${NR_OF_BUILD_UNITS})
+ ENDIF()
ENDIF()
# Disable precompiled header files for targets with two or less build units
@@ -112,7 +117,10 @@
ENDFOREACH(_file)
# Generate the filename
- SET(_unit_file ${CMAKE_CURRENT_BINARY_DIR}/${_target_name}BuildUnit${_unit_nr}.cc)
+ IF(NOT _nr_of_units EQUAL 1)
+ SET(_suffix ${_unit_nr})
+ ENDIF()
+ SET(_unit_file ${CMAKE_CURRENT_BINARY_DIR}/${_target_name}BuildUnit${_suffix}.cc)
# Only write if content has changed (avoids recompile)
IF(EXISTS ${_unit_file})
FILE(READ ${_unit_file} _file_include_string)
Modified: code/branches/unity_build/cmake/tools/TargetUtilities.cmake
===================================================================
--- code/branches/unity_build/cmake/tools/TargetUtilities.cmake 2011-05-28 20:31:50 UTC (rev 8652)
+++ code/branches/unity_build/cmake/tools/TargetUtilities.cmake 2011-05-28 20:40:10 UTC (rev 8653)
@@ -39,6 +39,7 @@
# specified with PCH_FILE
# NO_INSTALL: Do not install the target at all
# NO_VERSION: Prevents adding any version to a target
+ # NO_BUILD_UNITS: Disables automatic (full) build units
#
# Lists:
# LINK_LIBRARIES: Redirects to TARGET_LINK_LIBRARIES
@@ -90,7 +91,8 @@
# Specify all possible options (either switch or with add. arguments)
SET(_switches FIND_HEADER_FILES EXCLUDE_FROM_ALL ORXONOX_EXTERNAL
NO_DLL_INTERFACE NO_SOURCE_GROUPS PCH_NO_DEFAULT
- NO_INSTALL NO_VERSION ${_additional_switches})
+ NO_INSTALL NO_VERSION NO_BUILD_UNITS
+ ${_additional_switches})
SET(_list_names LINK_LIBRARIES VERSION SOURCE_FILES
DEFINE_SYMBOL TOLUA_FILES PCH_FILE
PCH_EXCLUDE OUTPUT_NAME LINK_LIBS_LINUX
@@ -201,8 +203,11 @@
ENDIF()
# Full build units
- IF(NOT _arg_ORXONOX_EXTERNAL AND ENABLE_BUILD_UNITS MATCHES "full")
- GENERATE_BUILD_UNITS(${_target_name} _${_target_name}_files)
+ IF(ENABLE_BUILD_UNITS AND NOT _arg_NO_BUILD_UNITS)
+ # Use full build units even in partial mode for externals
+ IF(ENABLE_BUILD_UNITS MATCHES "full" OR _arg_ORXONOX_EXTERNAL)
+ GENERATE_BUILD_UNITS(${_target_name} _${_target_name}_files)
+ ENDIF()
ENDIF()
# First part (pre target) of precompiled header files
Modified: code/branches/unity_build/src/external/bullet/BulletCollision/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/bullet/BulletCollision/CMakeLists.txt 2011-05-28 20:31:50 UTC (rev 8652)
+++ code/branches/unity_build/src/external/bullet/BulletCollision/CMakeLists.txt 2011-05-28 20:40:10 UTC (rev 8653)
@@ -1,7 +1,5 @@
ADD_SOURCE_FILES(BULLET_FILES
-BUILD_UNIT BulletCollisionBuildUnit.cpp
-
BroadphaseCollision/btAxisSweep3.cpp
BroadphaseCollision/btBroadphaseProxy.cpp
BroadphaseCollision/btCollisionAlgorithm.cpp
@@ -83,15 +81,12 @@
NarrowPhaseCollision/btGjkPairDetector.cpp
NarrowPhaseCollision/btMinkowskiPenetrationDepthSolver.cpp
NarrowPhaseCollision/btPersistentManifold.cpp
+ NarrowPhaseCollision/btPolyhedralContactClipping.cpp
NarrowPhaseCollision/btRaycastCallback.cpp
NarrowPhaseCollision/btSubSimplexConvexCast.cpp
NarrowPhaseCollision/btVoronoiSimplexSolver.cpp
-END_BUILD_UNIT
- # Raises compiler errors when compiled inside the build unit
- NarrowPhaseCollision/btPolyhedralContactClipping.cpp
-
# Headers
BroadphaseCollision/btAxisSweep3.h
BroadphaseCollision/btBroadphaseInterface.h
Modified: code/branches/unity_build/src/external/bullet/BulletDynamics/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/bullet/BulletDynamics/CMakeLists.txt 2011-05-28 20:31:50 UTC (rev 8652)
+++ code/branches/unity_build/src/external/bullet/BulletDynamics/CMakeLists.txt 2011-05-28 20:40:10 UTC (rev 8653)
@@ -1,7 +1,5 @@
ADD_SOURCE_FILES(BULLET_FILES
-BUILD_UNIT BulletDynamicsBuildUnit.cpp
-
Character/btKinematicCharacterController.cpp
ConstraintSolver/btConeTwistConstraint.cpp
@@ -25,8 +23,6 @@
Vehicle/btRaycastVehicle.cpp
Vehicle/btWheelInfo.cpp
-END_BUILD_UNIT
-
# Headers
ConstraintSolver/btConeTwistConstraint.h
ConstraintSolver/btConstraintSolver.h
Modified: code/branches/unity_build/src/external/bullet/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/bullet/CMakeLists.txt 2011-05-28 20:31:50 UTC (rev 8652)
+++ code/branches/unity_build/src/external/bullet/CMakeLists.txt 2011-05-28 20:40:10 UTC (rev 8653)
@@ -31,6 +31,8 @@
NO_DLL_INTERFACE
VERSION
2.78
+ EXCLUDE_FROM_BUILD_UNITS
+ BulletCollision/NarrowPhaseCollision/btPolyhedralContactClipping.cpp
SOURCE_FILES
${BULLET_FILES}
)
Modified: code/branches/unity_build/src/external/bullet/LinearMath/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/bullet/LinearMath/CMakeLists.txt 2011-05-28 20:31:50 UTC (rev 8652)
+++ code/branches/unity_build/src/external/bullet/LinearMath/CMakeLists.txt 2011-05-28 20:40:10 UTC (rev 8653)
@@ -1,13 +1,11 @@
ADD_SOURCE_FILES(BULLET_FILES
-BUILD_UNIT BulletLinearMathBuildUnit.cpp
btAlignedAllocator.cpp
btConvexHull.cpp
btConvexHullComputer.cpp
btGeometryUtil.cpp
btQuickprof.cpp
btSerializer.cpp
-END_BUILD_UNIT
# Headers
btAabbUtil2.h
Modified: code/branches/unity_build/src/external/ogreceguirenderer/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/ogreceguirenderer/CMakeLists.txt 2011-05-28 20:31:50 UTC (rev 8652)
+++ code/branches/unity_build/src/external/ogreceguirenderer/CMakeLists.txt 2011-05-28 20:40:10 UTC (rev 8653)
@@ -22,11 +22,9 @@
OgreCEGUIResourceProvider.h
OgreCEGUITexture.h
-BUILD_UNIT OgreCEGUIRendererBuildUnit.cpp
OgreCEGUIRenderer.cpp
OgreCEGUIResourceProvider.cpp
OgreCEGUITexture.cpp
-END_BUILD_UNIT
)
ORXONOX_ADD_LIBRARY(ogreceguirenderer_orxonox
Modified: code/branches/unity_build/src/external/ois/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/ois/CMakeLists.txt 2011-05-28 20:31:50 UTC (rev 8652)
+++ code/branches/unity_build/src/external/ois/CMakeLists.txt 2011-05-28 20:40:10 UTC (rev 8653)
@@ -33,14 +33,7 @@
OISMultiTouch.h
OISObject.h
OISPrereqs.h
-)
-# Put everything into one single build unit (doens't work on OS X though)
-IF(NOT APPLE)
- ADD_SOURCE_FILES(OIS_FILES BUILD_UNIT OISBuildUnit.cpp)
-ENDIF()
-
-ADD_SOURCE_FILES(OIS_FILES
OISEffect.cpp
OISException.cpp
OISForceFeedback.cpp
@@ -49,6 +42,7 @@
OISKeyboard.cpp
OISObject.cpp
)
+
IF(WIN32)
ADD_SUBDIRECTORY(win32)
ELSEIF(APPLE)
@@ -57,16 +51,16 @@
ADD_SUBDIRECTORY(linux)
ENDIF()
-# Close build unit from above
-IF(NOT APPLE)
- ADD_SOURCE_FILES(OIS_FILES END_BUILD_UNIT)
-ENDIF()
-
# MinGW doesn't come with some required Windows headers
IF(MINGW)
INCLUDE_DIRECTORIES(${WMI_INCLUDE_DIR})
ENDIF()
+# Apple has problems with OIS and build units
+IF(APPLE)
+ SET(USE_BUILD_UNITS NO_BUILD_UNITS)
+ENDIF()
+
ORXONOX_ADD_LIBRARY(ois_orxonox
ORXONOX_EXTERNAL
DEFINE_SYMBOL
@@ -81,6 +75,7 @@
/System/Library/Frameworks/Carbon.framework
LINK_LIBS_LINUX
X11
+ ${USE_BUILD_UNITS}
SOURCE_FILES
${OIS_FILES}
)
Modified: code/branches/unity_build/src/external/tinyxml/CMakeLists.txt
===================================================================
--- code/branches/unity_build/src/external/tinyxml/CMakeLists.txt 2011-05-28 20:31:50 UTC (rev 8652)
+++ code/branches/unity_build/src/external/tinyxml/CMakeLists.txt 2011-05-28 20:40:10 UTC (rev 8653)
@@ -23,13 +23,11 @@
tinystr.h
tinyxml.h
-BUILD_UNIT TicppBuildUnit.cpp
ticpp.cpp
tinystr.cpp
tinyxml.cpp
tinyxmlerror.cpp
tinyxmlparser.cpp
-END_BUILD_UNIT
)
ORXONOX_ADD_LIBRARY(tinyxml_orxonox
More information about the Orxonox-commit
mailing list