Skip to content

Commit 3c81838

Browse files
Merge #1289: cmake: Use full signature of add_test() command
755629b cmake: Use full signature of `add_test()` command (Hennadii Stepanov) Pull request description: This PR fixes tests for Windows binaries using Wine: ``` $ cmake -S . -B ../mingw -DCMAKE_TOOLCHAIN_FILE=cmake/x86_64-w64-mingw32.toolchain.cmake $ cmake --build ../mingw $ cmake --build ../mingw -t check Test project /home/hebasto/git/secp256k1/mingw Start 1: noverify_tests Could not find executable noverify_tests ... ``` ACKs for top commit: real-or-random: ACK 755629b Tree-SHA512: d1b24a1f1de2e8b70203132f4f6e685b9a120a987302cefe033fa916dfe7a135dbacaf8174d4046e30be170e92a16d070db54292c038cd2acdecc334f7f516dd
2 parents 4b0f711 + 755629b commit 3c81838

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.cirrus.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -403,7 +403,7 @@ task:
403403
- cmake --build build --config RelWithDebInfo -- -property:UseMultiToolTask=true;CL_MPcount=5
404404
check_script:
405405
- '%x64_NATIVE_TOOLS%'
406-
- ctest --test-dir build -j 5
406+
- ctest -C RelWithDebInfo --test-dir build -j 5
407407
- build\src\RelWithDebInfo\bench_ecmult.exe
408408
- build\src\RelWithDebInfo\bench_internal.exe
409409
- build\src\RelWithDebInfo\bench.exe

examples/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ endif()
1212

1313
add_executable(ecdsa_example ecdsa.c)
1414
target_link_libraries(ecdsa_example example)
15-
add_test(ecdsa_example ecdsa_example)
15+
add_test(NAME ecdsa_example COMMAND ecdsa_example)
1616

1717
if(SECP256K1_ENABLE_MODULE_ECDH)
1818
add_executable(ecdh_example ecdh.c)
1919
target_link_libraries(ecdh_example example)
20-
add_test(ecdh_example ecdh_example)
20+
add_test(NAME ecdh_example COMMAND ecdh_example)
2121
endif()
2222

2323
if(SECP256K1_ENABLE_MODULE_SCHNORRSIG)
2424
add_executable(schnorr_example schnorr.c)
2525
target_link_libraries(schnorr_example example)
26-
add_test(schnorr_example schnorr_example)
26+
add_test(NAME schnorr_example COMMAND schnorr_example)
2727
endif()

src/CMakeLists.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,12 +53,12 @@ endif()
5353
if(SECP256K1_BUILD_TESTS)
5454
add_executable(noverify_tests tests.c)
5555
target_link_libraries(noverify_tests secp256k1_precomputed secp256k1_asm)
56-
add_test(noverify_tests noverify_tests)
56+
add_test(NAME noverify_tests COMMAND noverify_tests)
5757
if(NOT CMAKE_BUILD_TYPE STREQUAL "Coverage")
5858
add_executable(tests tests.c)
5959
target_compile_definitions(tests PRIVATE VERIFY)
6060
target_link_libraries(tests secp256k1_precomputed secp256k1_asm)
61-
add_test(tests tests)
61+
add_test(NAME tests COMMAND tests)
6262
endif()
6363
endif()
6464

@@ -67,7 +67,7 @@ if(SECP256K1_BUILD_EXHAUSTIVE_TESTS)
6767
add_executable(exhaustive_tests tests_exhaustive.c)
6868
target_link_libraries(exhaustive_tests secp256k1_asm)
6969
target_compile_definitions(exhaustive_tests PRIVATE $<$<NOT:$<CONFIG:Coverage>>:VERIFY>)
70-
add_test(exhaustive_tests exhaustive_tests)
70+
add_test(NAME exhaustive_tests COMMAND exhaustive_tests)
7171
endif()
7272

7373
if(SECP256K1_BUILD_CTIME_TESTS)

0 commit comments

Comments
 (0)