2
0
mirror of https://github.com/boostorg/pfr.git synced 2026-01-19 04:22:13 +00:00

Update OSes in CI and run CMake tests (#207)

Fixes https://github.com/boostorg/pfr/issues/205
This commit is contained in:
Antony Polukhin
2025-06-11 21:40:44 +03:00
committed by GitHub
parent db9451143a
commit 57fa1018b0
2 changed files with 42 additions and 7 deletions

View File

@@ -2,6 +2,10 @@
# Distributed under the Boost Software License, Version 1.0.
# See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt
if(NOT TARGET tests)
add_custom_target(tests)
endif()
file(GLOB CORE_RUN_FILES "core/run/*.cpp")
foreach (testsourcefile ${CORE_RUN_FILES})
get_filename_component(testname ${testsourcefile} NAME_WLE)
@@ -9,13 +13,16 @@ foreach (testsourcefile ${CORE_RUN_FILES})
target_link_libraries(pfr_core_${testname} Boost::pfr)
target_include_directories(pfr_core_${testname} PRIVATE ../../../)
add_test(NAME pfr_core_${testname} COMMAND pfr_core_${testname})
add_dependencies(tests pfr_core_${testname})
endforeach()
file(GLOB CORE_NAME_RUN_FILES "core_name/run/*.cpp")
foreach (testsourcefile ${CORE_NAME_RUN_FILES})
get_filename_component(testname ${testsourcefile} NAME_WLE)
add_executable(pfr_corename_${testname} ${testsourcefile})
target_compile_features(pfr_corename_${testname} PUBLIC cxx_std_20)
target_link_libraries(pfr_corename_${testname} Boost::pfr)
target_include_directories(pfr_corename_${testname} PRIVATE ../../../)
add_test(NAME pfr_corename_${testname} COMMAND pfr_corename_${testname})
add_dependencies(tests pfr_corename_${testname})
endforeach()