mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-10 01:28:44 +02:00
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:
@@ -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)
|
||||
|
||||
@@ -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()
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user