2026-03-20 20:22:04 +08:00
|
|
|
cmake_minimum_required(VERSION 3.15)
|
|
|
|
|
|
|
|
|
|
project(XCEngine_SceneTests)
|
|
|
|
|
|
|
|
|
|
set(SCENE_TEST_SOURCES
|
|
|
|
|
test_scene.cpp
|
2026-03-27 13:07:39 +08:00
|
|
|
test_scene_runtime.cpp
|
2026-03-20 20:22:04 +08:00
|
|
|
test_scene_manager.cpp
|
|
|
|
|
)
|
|
|
|
|
|
refactor: improve test infrastructure and fix OpenGL GLAD initialization
- Rename D3D12Enum.h to D3D12Enums.h for naming consistency
- Fix OpenGL unit test GLAD initialization by using gladLoadGL()
instead of gladLoadGLLoader(wglGetProcAddress) for fallback support
- Migrate remaining tests to use gtest_discover_tests for granular
test discovery (math, core, containers, memory, threading, debug,
components, scene, resources, input, opengl)
- Remove obsolete TEST_RESOURCES_DIR and copy_directory commands
from OpenGL unit test CMakeLists (minimal/Res doesn't exist)
- Update TEST_SPEC.md with performance metrics and per-module
build/test commands for faster development workflow
- Update CMake path references to use lowercase paths
2026-03-23 00:43:02 +08:00
|
|
|
add_executable(scene_tests ${SCENE_TEST_SOURCES})
|
2026-03-20 20:22:04 +08:00
|
|
|
|
|
|
|
|
if(MSVC)
|
refactor: improve test infrastructure and fix OpenGL GLAD initialization
- Rename D3D12Enum.h to D3D12Enums.h for naming consistency
- Fix OpenGL unit test GLAD initialization by using gladLoadGL()
instead of gladLoadGLLoader(wglGetProcAddress) for fallback support
- Migrate remaining tests to use gtest_discover_tests for granular
test discovery (math, core, containers, memory, threading, debug,
components, scene, resources, input, opengl)
- Remove obsolete TEST_RESOURCES_DIR and copy_directory commands
from OpenGL unit test CMakeLists (minimal/Res doesn't exist)
- Update TEST_SPEC.md with performance metrics and per-module
build/test commands for faster development workflow
- Update CMake path references to use lowercase paths
2026-03-23 00:43:02 +08:00
|
|
|
set_target_properties(scene_tests PROPERTIES
|
2026-03-20 20:22:04 +08:00
|
|
|
LINK_FLAGS "/NODEFAULTLIB:libcpmt.lib /NODEFAULTLIB:libcmt.lib"
|
|
|
|
|
)
|
|
|
|
|
endif()
|
|
|
|
|
|
refactor: improve test infrastructure and fix OpenGL GLAD initialization
- Rename D3D12Enum.h to D3D12Enums.h for naming consistency
- Fix OpenGL unit test GLAD initialization by using gladLoadGL()
instead of gladLoadGLLoader(wglGetProcAddress) for fallback support
- Migrate remaining tests to use gtest_discover_tests for granular
test discovery (math, core, containers, memory, threading, debug,
components, scene, resources, input, opengl)
- Remove obsolete TEST_RESOURCES_DIR and copy_directory commands
from OpenGL unit test CMakeLists (minimal/Res doesn't exist)
- Update TEST_SPEC.md with performance metrics and per-module
build/test commands for faster development workflow
- Update CMake path references to use lowercase paths
2026-03-23 00:43:02 +08:00
|
|
|
target_link_libraries(scene_tests PRIVATE
|
2026-03-20 20:22:04 +08:00
|
|
|
XCEngine
|
|
|
|
|
GTest::gtest
|
|
|
|
|
GTest::gtest_main
|
|
|
|
|
)
|
|
|
|
|
|
refactor: improve test infrastructure and fix OpenGL GLAD initialization
- Rename D3D12Enum.h to D3D12Enums.h for naming consistency
- Fix OpenGL unit test GLAD initialization by using gladLoadGL()
instead of gladLoadGLLoader(wglGetProcAddress) for fallback support
- Migrate remaining tests to use gtest_discover_tests for granular
test discovery (math, core, containers, memory, threading, debug,
components, scene, resources, input, opengl)
- Remove obsolete TEST_RESOURCES_DIR and copy_directory commands
from OpenGL unit test CMakeLists (minimal/Res doesn't exist)
- Update TEST_SPEC.md with performance metrics and per-module
build/test commands for faster development workflow
- Update CMake path references to use lowercase paths
2026-03-23 00:43:02 +08:00
|
|
|
target_include_directories(scene_tests PRIVATE
|
2026-03-20 20:22:04 +08:00
|
|
|
${CMAKE_SOURCE_DIR}/engine/include
|
|
|
|
|
)
|
|
|
|
|
|
refactor: improve test infrastructure and fix OpenGL GLAD initialization
- Rename D3D12Enum.h to D3D12Enums.h for naming consistency
- Fix OpenGL unit test GLAD initialization by using gladLoadGL()
instead of gladLoadGLLoader(wglGetProcAddress) for fallback support
- Migrate remaining tests to use gtest_discover_tests for granular
test discovery (math, core, containers, memory, threading, debug,
components, scene, resources, input, opengl)
- Remove obsolete TEST_RESOURCES_DIR and copy_directory commands
from OpenGL unit test CMakeLists (minimal/Res doesn't exist)
- Update TEST_SPEC.md with performance metrics and per-module
build/test commands for faster development workflow
- Update CMake path references to use lowercase paths
2026-03-23 00:43:02 +08:00
|
|
|
include(GoogleTest)
|
2026-03-27 13:07:39 +08:00
|
|
|
gtest_discover_tests(scene_tests)
|