Skip to content

Commit 1d6ee93

Browse files
Fixing tests
1 parent a83153a commit 1d6ee93

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

cmake/download_cpm.cmake

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# copied from CPM.cmake GitHub site
3+
# download CPM.cmake
4+
5+
file(
6+
DOWNLOAD
7+
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.39.0/CPM.cmake
8+
${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
9+
)
10+
include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)

test/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ CPMAddPackage ( "gh:connectivecpp/[email protected]" )
1717
set ( test_app_names extract_append_test
1818
binary_serialize_test )
1919
# add executable
20-
foreach ( test_app_name IN LISTS test_app_name )
20+
foreach ( test_app_name IN LISTS test_app_names )
21+
message ( "Creating test executable: ${test_app_name}" )
2122
add_executable ( ${test_app_name} ${test_app_name}.cpp )
2223
target_compile_features ( ${test_app_name} PRIVATE cxx_std_20 )
23-
target_link_libraries ( ${test_app_name} PRIVATE utility_rack Catch2::Catch2WithMain )
24+
target_link_libraries ( ${test_app_name} PRIVATE binary_serialize utility_rack Catch2::Catch2WithMain )
2425
endforeach()
2526

2627
enable_testing()
2728

28-
foreach ( test_app_name IN LISTS test_app_name )
29+
foreach ( test_app_name IN LISTS test_app_names )
30+
message ( "Creating test: run_${test_app_name}" )
2931
add_test ( NAME run_${test_app_name} COMMAND ${test_app_name} )
3032
set_tests_properties ( run_${test_app_name}
3133
PROPERTIES PASS_REGULAR_EXPRESSION "All tests passed"

0 commit comments

Comments
 (0)