cmake: Use full signature of add_test() command

An executable target in the `COMMAND` option will automatically be
replaced by the location of the executable created at build time.

This change fixes tests for Windows binaries using Wine.
This commit is contained in:
Hennadii Stepanov committed 2023-04-29 09:49:25 +01:00
1 parent 4b0f711d46
commit 755629bc03
3 files changed
+7 -7

No files matched your search

+3 -3
View File
@@ -12,16 +12,16 @@ endif()
add_executable(ecdsa_example ecdsa.c)
target_link_libraries(ecdsa_example example)
add_test(ecdsa_example ecdsa_example)
add_test(NAME ecdsa_example COMMAND ecdsa_example)
if(SECP256K1_ENABLE_MODULE_ECDH)
add_executable(ecdh_example ecdh.c)
target_link_libraries(ecdh_example example)
add_test(ecdh_example ecdh_example)
add_test(NAME ecdh_example COMMAND ecdh_example)
endif()
if(SECP256K1_ENABLE_MODULE_SCHNORRSIG)
add_executable(schnorr_example schnorr.c)
target_link_libraries(schnorr_example example)
add_test(schnorr_example schnorr_example)
add_test(NAME schnorr_example COMMAND schnorr_example)
endif()