- 新增Math库: Vector2/3/4, Matrix3/4, Quaternion, Transform, Color等 - 新增测试框架: Google Test (gtest) - 新增140个单元测试,覆盖Vector, Matrix, Quaternion, Geometry - VolumeRenderer支持vcpkg的NanoVDB - 添加TESTING.md测试文档
34 lines
826 B
CMake
34 lines
826 B
CMake
# ============================================================
|
|
# Math Library Tests
|
|
# ============================================================
|
|
|
|
set(MATH_TEST_SOURCES
|
|
test_vector.cpp
|
|
test_matrix.cpp
|
|
test_quaternion.cpp
|
|
test_geometry.cpp
|
|
)
|
|
|
|
add_executable(xcengine_math_tests ${MATH_TEST_SOURCES})
|
|
|
|
# Exclude all static runtime libraries to avoid conflicts
|
|
if(MSVC)
|
|
set_target_properties(xcengine_math_tests PROPERTIES
|
|
LINK_FLAGS "/NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcmt.lib"
|
|
)
|
|
endif()
|
|
|
|
target_link_libraries(xcengine_math_tests
|
|
PRIVATE
|
|
XCEngine
|
|
GTest::gtest
|
|
GTest::gtest_main
|
|
)
|
|
|
|
target_include_directories(xcengine_math_tests PRIVATE
|
|
${CMAKE_SOURCE_DIR}/engine/include
|
|
${CMAKE_SOURCE_DIR}/tests/fixtures
|
|
)
|
|
|
|
add_test(NAME MathTests COMMAND xcengine_math_tests)
|