box3d/test/CMakeLists.txt
Erin Catto 1767150df4
Pull model task API (#228)
Port the pull model task API from Box2D.

https://github.com/erincatto/box2d/pull/1133

Addresses discussion #150
2026-11-17 16:42:52 -08:00

61 lines
1.4 KiB
CMake

# Box3D unit test app
set(BOX3D_TEST_FILES
main.c
test_allocator.c
test_bitset.c
test_body.c
test_body_query.c
test_broad_phase.c
test_collision.c
test_compound.c
test_container.c
test_determinism.c
test_distance.c
test_dynamic_tree.c
test_hash.c
test_height_field.c
test_hull.c
test_id.c
test_joint.c
test_large_world.c
test_macros.h
test_manifold.c
test_math.c
test_mesh.c
test_mover.c
test_name_cache.c
test_recording.c
test_restitution.c
test_sat.c
test_shape.c
test_step.c
test_table.c
test_world.c
)
add_executable(test ${BOX3D_TEST_FILES})
set_target_properties(test PROPERTIES
C_STANDARD 17
C_STANDARD_REQUIRED YES
C_EXTENSIONS NO
)
if(BOX3D_COMPILE_WARNING_AS_ERROR)
set_target_properties(test PROPERTIES COMPILE_WARNING_AS_ERROR ON)
endif()
# Special access to Box3D internals for testing. The internal headers select the SIMD path
# from the build configuration, so the tests must see the same selection as the library.
target_include_directories(test PRIVATE ${CMAKE_SOURCE_DIR}/src)
target_compile_definitions(test PRIVATE ${BOX3D_SIMD_DEFINITIONS})
target_compile_options(test PRIVATE ${BOX3D_SIMD_OPTIONS})
if(BOX3D_VALIDATE)
target_compile_definitions(test PRIVATE BOX3D_VALIDATE)
endif()
target_link_libraries(test PRIVATE box3d shared)
source_group(TREE "${CMAKE_CURRENT_SOURCE_DIR}" PREFIX "" FILES ${BOX3D_TEST_FILES})