- fixing various race conditions throughout (usage of static vars, etc)
- addition of a few lightweight mutexes (which are compiled out by default)
- slight code rearrangement in discreteDynamicsWorld to facilitate multithreading
- PoolAllocator::allocate() can now be called when pool is full without
crashing (null pointer returned)
- PoolAllocator allocate and freeMemory, are OPTIONALLY threadsafe
(default is un-threadsafe)
- CollisionDispatcher no longer checks if the pool allocator is full
before calling allocate(), instead it just calls allocate() and
checks if the return is null -- this avoids a race condition
- SequentialImpulseConstraintSolver OPTIONALLY uses different logic in
getOrInitSolverBody() to avoid a race condition with kinematic bodies
- addition of 2 classes which together allow simulation islands to be run
in parallel:
- btSimulationIslandManagerMt
- btDiscreteDynamicsWorldMt
- MultiThreadedDemo example in the example browser demonstrating use of
OpenMP, Microsoft PPL, and Intel TBB
- use multithreading for other demos
- benchmark demo: add parallel raycasting
75 lines
2.0 KiB
CMake
75 lines
2.0 KiB
CMake
|
|
INCLUDE_DIRECTORIES(
|
|
${BULLET_PHYSICS_SOURCE_DIR}/src
|
|
)
|
|
|
|
SET(LinearMath_SRCS
|
|
btAlignedAllocator.cpp
|
|
btConvexHull.cpp
|
|
btConvexHullComputer.cpp
|
|
btGeometryUtil.cpp
|
|
btPolarDecomposition.cpp
|
|
btQuickprof.cpp
|
|
btSerializer.cpp
|
|
btThreads.cpp
|
|
btVector3.cpp
|
|
)
|
|
|
|
SET(LinearMath_HDRS
|
|
btAabbUtil2.h
|
|
btAlignedAllocator.h
|
|
btAlignedObjectArray.h
|
|
btConvexHull.h
|
|
btConvexHullComputer.h
|
|
btDefaultMotionState.h
|
|
btGeometryUtil.h
|
|
btGrahamScan2dConvexHull.h
|
|
btHashMap.h
|
|
btIDebugDraw.h
|
|
btList.h
|
|
btMatrix3x3.h
|
|
btMinMax.h
|
|
btMotionState.h
|
|
btPolarDecomposition.h
|
|
btPoolAllocator.h
|
|
btQuadWord.h
|
|
btQuaternion.h
|
|
btQuickprof.h
|
|
btRandom.h
|
|
btScalar.h
|
|
btSerializer.h
|
|
btStackAlloc.h
|
|
btThreads.h
|
|
btTransform.h
|
|
btTransformUtil.h
|
|
btVector3.h
|
|
)
|
|
|
|
ADD_LIBRARY(LinearMath ${LinearMath_SRCS} ${LinearMath_HDRS})
|
|
SET_TARGET_PROPERTIES(LinearMath PROPERTIES VERSION ${BULLET_VERSION})
|
|
SET_TARGET_PROPERTIES(LinearMath PROPERTIES SOVERSION ${BULLET_VERSION})
|
|
|
|
IF (INSTALL_LIBS)
|
|
IF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
|
#FILES_MATCHING requires CMake 2.6
|
|
IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
|
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
|
INSTALL(TARGETS LinearMath DESTINATION .)
|
|
ELSE (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
|
INSTALL(TARGETS LinearMath
|
|
RUNTIME DESTINATION bin
|
|
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
|
ARCHIVE DESTINATION lib${LIB_SUFFIX})
|
|
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
|
DESTINATION ${INCLUDE_INSTALL_DIR} FILES_MATCHING PATTERN "*.h" PATTERN
|
|
".svn" EXCLUDE PATTERN "CMakeFiles" EXCLUDE)
|
|
ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
|
ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 2.5)
|
|
|
|
IF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
|
SET_TARGET_PROPERTIES(LinearMath PROPERTIES FRAMEWORK true)
|
|
SET_TARGET_PROPERTIES(LinearMath PROPERTIES PUBLIC_HEADER "${LinearMath_HDRS}")
|
|
ENDIF (APPLE AND BUILD_SHARED_LIBS AND FRAMEWORK)
|
|
ENDIF (NOT INTERNAL_CREATE_DISTRIBUTABLE_MSVC_PROJECTFILES)
|
|
ENDIF (INSTALL_LIBS)
|