Changeset 8558 for code/branches
- Timestamp:
- May 24, 2011, 4:15:19 AM (14 years ago)
- Location:
- code/branches/unity_build
- Files:
-
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/unity_build/cmake/tools/SourceFileUtilities.cmake
r7818 r8558 25 25 # adds the current directory. 26 26 # Also compiles multiple source files into a single 27 # one by including them28 # Use COMPILATION_[BEGIN|END]in27 # translation unit (faster) 28 # Use [END_]BUILD_UNIT in 29 29 # [ADD|SET]_SOURCE_FILES and specify the name of 30 # the new source file after COMPILATION_BEGIN30 # the new source file after BUILD_UNIT 31 31 # GET_ALL_HEADER_FILES - Finds all header files recursively. 32 32 # GENERATE_SOURCE_GROUPS - Set Visual Studio source groups. … … 36 36 SET(_source_files) 37 37 FOREACH(_file ${ARGN}) 38 IF(_file MATCHES "^( COMPILATION_BEGIN|COMPILATION_END)$")38 IF(_file MATCHES "^(BUILD_UNIT|END_BUILD_UNIT)$") 39 39 # Append keywords verbatim 40 40 LIST(APPEND _source_files ${_file}) -
code/branches/unity_build/cmake/tools/TargetUtilities.cmake
r8421 r8558 95 95 PARSE_MACRO_ARGUMENTS("${_switches}" "${_list_names}" ${ARGN}) 96 96 97 # Process source files with support for compilations97 # Process source files with support for build units 98 98 # Note: All file paths are relative to the root source directory, even the 99 # name of the compilation file.99 # name of the build unit. 100 100 SET(_${_target_name}_source_files) 101 SET(_get_ compilation_file FALSE)102 SET(_add_to_ compilationFALSE)101 SET(_get_build_unit_file FALSE) 102 SET(_add_to_build_unit FALSE) 103 103 FOREACH(_file ${_arg_SOURCE_FILES}) 104 IF(_file STREQUAL " COMPILATION_BEGIN")105 # Next file is the name of the compilation106 SET(_get_ compilation_file TRUE)107 ELSEIF(_file STREQUAL " COMPILATION_END")108 IF(NOT _ compilation_file)109 MESSAGE(FATAL_ERROR "No name provided for source file compilation")110 ENDIF() 111 IF(NOT DISABLE_ COMPILATIONS)112 IF(NOT _ compilation_include_string)113 MESSAGE(STATUS "Warning: Empty source file compilation!")114 ENDIF() 115 IF(EXISTS ${_ compilation_file})116 FILE(READ ${_ compilation_file} _include_string_file)117 ENDIF() 118 IF(NOT _ compilation_include_string STREQUAL "${_include_string_file}")119 FILE(WRITE ${_ compilation_file} "${_compilation_include_string}")120 ENDIF() 121 LIST(APPEND _${_target_name}_source_files ${_ compilation_file})122 ENDIF() 123 SET(_add_to_ compilationFALSE)124 ELSEIF(_get_ compilation_file)125 SET(_ compilation_file ${CMAKE_BINARY_DIR}/${_file})126 SET(_get_ compilation_file FALSE)127 SET(_add_to_ compilationTRUE)128 SET(_ compilation_include_string)104 IF(_file STREQUAL "BUILD_UNIT") 105 # Next file is the name of the build unit 106 SET(_get_build_unit_file TRUE) 107 ELSEIF(_file STREQUAL "END_BUILD_UNIT") 108 IF(NOT _build_unit_file) 109 MESSAGE(FATAL_ERROR "No name provided for build unit") 110 ENDIF() 111 IF(NOT DISABLE_BUILD_UNITS) 112 IF(NOT _build_unit_include_string) 113 MESSAGE(STATUS "Warning: Empty build unit!") 114 ENDIF() 115 IF(EXISTS ${_build_unit_file}) 116 FILE(READ ${_build_unit_file} _include_string_file) 117 ENDIF() 118 IF(NOT _build_unit_include_string STREQUAL "${_include_string_file}") 119 FILE(WRITE ${_build_unit_file} "${_build_unit_include_string}") 120 ENDIF() 121 LIST(APPEND _${_target_name}_source_files ${_build_unit_file}) 122 ENDIF() 123 SET(_add_to_build_unit FALSE) 124 ELSEIF(_get_build_unit_file) 125 SET(_build_unit_file ${CMAKE_BINARY_DIR}/${_file}) 126 SET(_get_build_unit_file FALSE) 127 SET(_add_to_build_unit TRUE) 128 SET(_build_unit_include_string) 129 129 ELSE() 130 130 # Default, add source file … … 146 146 LIST(APPEND _${_target_name}_source_files ${_file}) 147 147 148 # Handle compilations149 IF(_add_to_ compilation AND NOT DISABLE_COMPILATIONS)148 # Handle build units 149 IF(_add_to_build_unit AND NOT DISABLE_BUILD_UNITS) 150 150 IF(_file MATCHES "\\.(c|cc|cpp|cxx)$") 151 SET(_ compilation_include_string "${_compilation_include_string}#include \"${_file}\"\n")151 SET(_build_unit_include_string "${_build_unit_include_string}#include \"${_file}\"\n") 152 152 ENDIF() 153 153 # Don't compile these files, even if they are source files -
code/branches/unity_build/src/CMakeLists.txt
r8420 r8558 66 66 ADD_LINKER_FLAGS ("-INCREMENTAL:NO" Debug) 67 67 ENDIF() 68 IF(NOT DISABLE_ COMPILATIONS)69 # Compilations seem to generate 'memory leaks' with static variables70 MESSAGE("Warning: You should disable Compilations when using VLD!")68 IF(NOT DISABLE_BUILD_UNITS) 69 # Build units seem to generate 'memory leaks' with static variables 70 MESSAGE("Warning: You should disable build units when using VLD!") 71 71 ENDIF() 72 72 ENDIF() -
code/branches/unity_build/src/OrxonoxConfig.cmake
r8412 r8558 35 35 36 36 # Global switch to disable multiple file compilations 37 OPTION(DISABLE_ COMPILATIONS "Global multi-file compilation switch" FALSE)37 OPTION(DISABLE_BUILD_UNITS "Disables building multiple source files as one." FALSE) 38 38 39 39 # Use WinMain() or main()? -
code/branches/unity_build/src/external/bullet/BulletCollision/CMakeLists.txt
r8393 r8558 1 1 ADD_SOURCE_FILES(BULLET_FILES 2 2 3 COMPILATION_BEGIN BulletCollisionCompilation.cpp3 BUILD_UNIT BulletCollisionBuildUnit.cpp 4 4 5 5 BroadphaseCollision/btAxisSweep3.cpp … … 88 88 NarrowPhaseCollision/btVoronoiSimplexSolver.cpp 89 89 90 COMPILATION_END 90 END_BUILD_UNIT 91 91 92 # Raises compiler errors when compiled inside the compilation92 # Raises compiler errors when compiled inside the build unit 93 93 NarrowPhaseCollision/btPolyhedralContactClipping.cpp 94 94 -
code/branches/unity_build/src/external/bullet/BulletDynamics/CMakeLists.txt
r8351 r8558 1 1 ADD_SOURCE_FILES(BULLET_FILES 2 2 3 COMPILATION_BEGIN BulletDynamicsCompilation.cpp3 BUILD_UNIT BulletDynamicsBuildUnit.cpp 4 4 5 5 Character/btKinematicCharacterController.cpp … … 26 26 Vehicle/btWheelInfo.cpp 27 27 28 COMPILATION_END 28 END_BUILD_UNIT 29 29 30 30 # Headers -
code/branches/unity_build/src/external/bullet/LinearMath/CMakeLists.txt
r8393 r8558 1 1 ADD_SOURCE_FILES(BULLET_FILES 2 2 3 COMPILATION_BEGIN BulletLinearMathCompilation.cpp3 BUILD_UNIT BulletLinearMathBuildUnit.cpp 4 4 btAlignedAllocator.cpp 5 5 btConvexHull.cpp 6 6 btConvexHullComputer.cpp 7 7 btGeometryUtil.cpp 8 8 btQuickprof.cpp 9 9 btSerializer.cpp 10 COMPILATION_END 10 END_BUILD_UNIT 11 11 12 12 # Headers … … 15 15 btAlignedObjectArray.h 16 16 btConvexHull.h 17 17 btConvexHullComputer.h 18 18 btDefaultMotionState.h 19 19 btGeometryUtil.h -
code/branches/unity_build/src/external/enet/CMakeLists.txt
r8351 r8558 29 29 win32.h 30 30 31 COMPILATION_BEGIN ENetCompilation.c31 BUILD_UNIT ENetBuildUnit.c 32 32 callbacks.c 33 33 compress.c … … 39 39 unix.c 40 40 win32.c 41 COMPILATION_END 41 END_BUILD_UNIT 42 42 ) 43 43 -
code/branches/unity_build/src/external/ogreceguirenderer/CMakeLists.txt
r8351 r8558 23 23 OgreCEGUITexture.h 24 24 25 COMPILATION_BEGIN OgreCEGUIRendererCompilation.cpp25 BUILD_UNIT OgreCEGUIRendererBuildUnit.cpp 26 26 OgreCEGUIRenderer.cpp 27 27 OgreCEGUIResourceProvider.cpp 28 28 OgreCEGUITexture.cpp 29 COMPILATION_END 29 END_BUILD_UNIT 30 30 ) 31 31 -
code/branches/unity_build/src/external/ois/CMakeLists.txt
r8351 r8558 35 35 OISPrereqs.h 36 36 37 # COMPILATION_BEGIN OISCompilation.cpp37 #BUILD_UNIT OISBuildUnit.cpp 38 38 OISEffect.cpp 39 39 OISException.cpp … … 43 43 OISKeyboard.cpp 44 44 OISObject.cpp 45 # COMPILATION_END45 #END_BUILD_UNIT 46 46 ) 47 47 IF(WIN32) -
code/branches/unity_build/src/external/ois/linux/CMakeLists.txt
r5929 r8558 8 8 LinuxPrereqs.h 9 9 10 COMPILATION_BEGIN OISLinuxCompilation.cpp10 BUILD_UNIT OISLinuxBuildUnit.cpp 11 11 EventHelpers.cpp 12 12 LinuxForceFeedback.cpp … … 15 15 LinuxKeyboard.cpp 16 16 LinuxMouse.cpp 17 COMPILATION_END 17 END_BUILD_UNIT 18 18 ) -
code/branches/unity_build/src/external/ois/mac/CMakeLists.txt
r8351 r8558 8 8 MacPrereqs.h 9 9 10 # COMPILATION_BEGIN OISMacCompilation.cpp10 #BUILD_UNIT OISMacBuildUnit.cpp 11 11 MacHelpers.cpp 12 12 MacHIDManager.cpp … … 15 15 MacKeyboard.cpp 16 16 MacMouse.cpp 17 # COMPILATION_END17 #END_BUILD_UNIT 18 18 ) -
code/branches/unity_build/src/external/ois/win32/CMakeLists.txt
r5929 r8558 7 7 Win32Prereqs.h 8 8 9 COMPILATION_BEGIN OISWin32Compilation.cpp9 BUILD_UNIT OISWin32BuildUnit.cpp 10 10 Win32ForceFeedback.cpp 11 11 Win32InputManager.cpp … … 13 13 Win32KeyBoard.cpp 14 14 Win32Mouse.cpp 15 COMPILATION_END 15 END_BUILD_UNIT 16 16 ) -
code/branches/unity_build/src/external/tinyxml/CMakeLists.txt
r8351 r8558 24 24 tinyxml.h 25 25 26 COMPILATION_BEGIN TicppCompilation.cpp26 BUILD_UNIT TicppBuildUnit.cpp 27 27 ticpp.cpp 28 28 tinystr.cpp … … 30 30 tinyxmlerror.cpp 31 31 tinyxmlparser.cpp 32 COMPILATION_END 32 END_BUILD_UNIT 33 33 ) 34 34 -
code/branches/unity_build/src/libraries/core/CMakeLists.txt
r8351 r8558 49 49 XMLPort.cc 50 50 51 COMPILATION_BEGIN ListenerCompilation.cc51 BUILD_UNIT ListenerBuildUnit.cc 52 52 ViewportEventListener.cc 53 53 WindowEventListener.cc 54 54 XMLNameListener.cc 55 COMPILATION_END 55 END_BUILD_UNIT 56 56 57 COMPILATION_BEGIN FilesystemCompilation.cc57 BUILD_UNIT FilesystemBuildUnit.cc 58 58 command/ArgumentCompletionFunctions.cc 59 59 ConfigFileManager.cc 60 60 PathConfig.cc 61 COMPILATION_END 61 END_BUILD_UNIT 62 62 63 63 # multithreading 64 64 ThreadPool.cc 65 COMPILATION_BEGIN ThreadCompilation.cc65 BUILD_UNIT ThreadBuildUnit.cc 66 66 command/TclThreadManager.cc 67 67 Thread.cc 68 COMPILATION_END 68 END_BUILD_UNIT 69 69 ) 70 70 -
code/branches/unity_build/src/libraries/network/packet/CMakeLists.txt
r7314 r8558 1 1 ADD_SOURCE_FILES(NETWORK_SRC_FILES 2 COMPILATION_BEGIN PacketCompilation.cc 2 3 BUILD_UNIT PacketBuildUnit.cc 3 4 Acknowledgement.cc 4 5 Chat.cc … … 10 11 Packet.cc 11 12 Welcome.cc 12 COMPILATION_END 13 END_BUILD_UNIT 14 13 15 ServerInformation.cc 14 16 ) -
code/branches/unity_build/src/libraries/tools/CMakeLists.txt
r8351 r8558 1 1 SET_SOURCE_FILES(TOOLS_SRC_FILES 2 COMPILATION_BEGIN ResourceCompilation.cc 2 3 BUILD_UNIT ResourceBuildUnit.cc 3 4 ResourceCollection.cc 4 5 ResourceLocation.cc 5 COMPILATION_END 6 END_BUILD_UNIT 7 6 8 TextureGenerator.cc 7 9 Timer.cc 8 COMPILATION_BEGIN OgreCompilation.cc 10 11 BUILD_UNIT OgreBuildUnit.cc 9 12 BillboardSet.cc 10 13 DynamicLines.cc … … 13 16 ParticleInterface.cc 14 17 Shader.cc 15 COMPILATION_END 18 END_BUILD_UNIT 16 19 ) 20 17 21 #ADD_SUBDIRECTORY(bsp) 18 22 ADD_SUBDIRECTORY(interfaces) -
code/branches/unity_build/src/libraries/util/CMakeLists.txt
r8351 r8558 19 19 20 20 SET_SOURCE_FILES(UTIL_SRC_FILES 21 COMPILATION_BEGIN StableCompilation.cc 21 22 BUILD_UNIT StableBuildUnit.cc 22 23 Clipboard.cc 23 24 Clock.cc … … 32 33 SmallObjectAllocator.cc 33 34 SubString.cc 34 COMPILATION_END 35 END_BUILD_UNIT 35 36 36 37 MultiType.cc -
code/branches/unity_build/src/modules/pong/CMakeLists.txt
r7163 r8558 1 1 SET_SOURCE_FILES(PONG_SRC_FILES 2 COMPILATION_BEGIN PongCompilation.cc2 BUILD_UNIT PongBuildUnit.cc 3 3 Pong.cc 4 4 PongAI.cc … … 8 8 PongCenterpoint.cc 9 9 PongScore.cc 10 COMPILATION_END 10 END_BUILD_UNIT 11 11 ) 12 12 -
code/branches/unity_build/src/orxonox/CMakeLists.txt
r8351 r8558 35 35 ChatInputHandler.cc 36 36 # Test.cc 37 COMPILATION_BEGIN SceneCompilation.cc 37 38 BUILD_UNIT SceneBuildUnit.cc 38 39 CameraManager.cc 39 40 Scene.cc 40 COMPILATION_END 41 END_BUILD_UNIT 41 42 ) 42 43 -
code/branches/unity_build/src/orxonox/graphics/CMakeLists.txt
r7163 r8558 9 9 ParticleEmitter.cc 10 10 ParticleSpawner.cc 11 COMPILATION_BEGIN GraphicsCompilation.cc 11 12 BUILD_UNIT GraphicsBuildUnit.cc 12 13 Backlight.cc 13 14 Camera.cc 14 15 Light.cc 15 COMPILATION_END 16 END_BUILD_UNIT 16 17 )
Note: See TracChangeset
for help on using the changeset viewer.