Merge pull request #2 from SamG-Coder/fix/relinker-ctest-registration

fix(build): register relinker tests with CTest
This change:
Defines BUILD_TESTING with a default of OFF and enables testing at the root when requested.
Registers the Windows dependency diagnostics test and includes its executable in normal builds when testing is enabled.
Allows CTest to discover the existing strict NID filter test.
This commit is contained in:
boykopovar
2026-09-25 07:07:04 +03:00
committed by GitHub
2 changed files with 9 additions and 0 deletions
+5
View File
@@ -1,6 +1,11 @@
cmake_minimum_required(VERSION 3.20)
project(Relinker CXX)
option(BUILD_TESTING "Build and register relinker tests" OFF)
if(BUILD_TESTING)
enable_testing()
endif()
option(ANYPS5_ENABLE_SPIRV_TOOLS "Enable SPIRV-Tools validation and optimization" OFF)
set(CMAKE_CXX_STANDARD 20)
+4
View File
@@ -65,6 +65,10 @@ if(WIN32)
${CMAKE_CURRENT_SOURCE_DIR}/io/src/BufferUtils.cpp
)
target_include_directories(windows_dependency_diagnostics_tests PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/elfpatcher/include ${CMAKE_CURRENT_SOURCE_DIR}/domain/include ${CMAKE_CURRENT_SOURCE_DIR}/io/include ${CMAKE_CURRENT_SOURCE_DIR}/codegen/include)
if(BUILD_TESTING)
set_target_properties(windows_dependency_diagnostics_tests PROPERTIES EXCLUDE_FROM_ALL FALSE)
add_test(NAME windows_dependency_diagnostics COMMAND windows_dependency_diagnostics_tests)
endif()
endif()