- 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
47 lines
1.2 KiB
CMake
47 lines
1.2 KiB
CMake
cmake_minimum_required(VERSION 3.15)
|
|
|
|
get_filename_component(PROJECT_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../../../.. ABSOLUTE)
|
|
|
|
find_package(OpenGL REQUIRED)
|
|
|
|
include_directories(${CMAKE_SOURCE_DIR}/tests/opengl/package/include/)
|
|
include_directories(${PROJECT_ROOT_DIR}/engine/include)
|
|
include_directories(${PROJECT_ROOT_DIR}/engine/src)
|
|
|
|
find_package(GTest REQUIRED)
|
|
|
|
set(TEST_SOURCES
|
|
${CMAKE_SOURCE_DIR}/tests/opengl/package/src/glad.c
|
|
fixtures/OpenGLTestFixture.cpp
|
|
test_device.cpp
|
|
test_buffer.cpp
|
|
test_fence.cpp
|
|
test_texture.cpp
|
|
test_shader.cpp
|
|
test_pipeline_state.cpp
|
|
test_vertex_array.cpp
|
|
test_command_list.cpp
|
|
test_render_target_view.cpp
|
|
test_depth_stencil_view.cpp
|
|
test_swap_chain.cpp
|
|
test_sampler.cpp
|
|
)
|
|
|
|
add_executable(opengl_engine_tests ${TEST_SOURCES})
|
|
|
|
target_link_libraries(opengl_engine_tests PRIVATE
|
|
opengl32
|
|
XCEngine
|
|
GTest::gtest
|
|
GTest::gtest_main
|
|
)
|
|
|
|
target_include_directories(opengl_engine_tests PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/fixtures
|
|
${PROJECT_ROOT_DIR}/engine/include
|
|
${PROJECT_ROOT_DIR}/engine/src
|
|
)
|
|
|
|
enable_testing()
|
|
include(GoogleTest)
|
|
gtest_discover_tests(opengl_engine_tests) |