File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -144,15 +144,16 @@ if(SECP256K1_BUILD_TESTS)
144144 list (APPEND TEST_DEFINITIONS SUPPORTS_CONCURRENCY=1)
145145 endif ()
146146
147- add_executable (noverify_tests tests.c)
148- target_link_libraries (noverify_tests secp256k1_precomputed secp256k1_asm)
149- target_compile_definitions (noverify_tests PRIVATE ${TEST_DEFINITIONS} )
150- add_test (NAME secp256k1_noverify_tests COMMAND noverify_tests)
147+ function (add_executable_and_tests exe_name verify_definition)
148+ add_executable (${exe_name} tests.c)
149+ target_link_libraries (${exe_name} secp256k1_precomputed secp256k1_asm)
150+ target_compile_definitions (${exe_name} PRIVATE ${verify_definition} ${TEST_DEFINITIONS} )
151+ add_test (NAME secp256k1_${exe_name} COMMAND ${exe_name} )
152+ endfunction ()
153+
154+ add_executable_and_tests(noverify_tests "" )
151155 if (NOT CMAKE_BUILD_TYPE STREQUAL "Coverage" )
152- add_executable (tests tests.c)
153- target_compile_definitions (tests PRIVATE VERIFY ${TEST_DEFINITIONS} )
154- target_link_libraries (tests secp256k1_precomputed secp256k1_asm)
155- add_test (NAME secp256k1_tests COMMAND tests)
156+ add_executable_and_tests(tests VERIFY)
156157 endif ()
157158 unset (TEST_DEFINITIONS)
158159endif ()
You can’t perform that action at this time.
0 commit comments