You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
63 lines
2.3 KiB
63 lines
2.3 KiB
4 years ago
|
# Tests
|
||
|
set(MCL_TEST_BASE fp_test ec_test fp_util_test window_method_test elgamal_test
|
||
|
fp_tower_test gmp_test bn_test glv_test)
|
||
|
foreach(base IN ITEMS ${MCL_TEST_BASE})
|
||
|
add_executable(${base} ${base}.cpp)
|
||
|
target_link_libraries(${base} PRIVATE mcl::mcl)
|
||
|
set_target_properties(${base} PROPERTIES
|
||
|
CXX_STANDARD 11
|
||
|
CXX_STANDARD_REQUIRED YES
|
||
|
CXX_EXTENSIONS NO)
|
||
|
target_compile_options(${base} PRIVATE ${MCL_COMPILE_OPTIONS})
|
||
|
target_compile_definitions(${base} PRIVATE MCL_DONT_EXPORT)
|
||
|
add_test(NAME ${base} COMMAND ${base})
|
||
|
endforeach()
|
||
|
|
||
|
# Tests for mclbnXXX
|
||
|
foreach(bit IN ITEMS 256 384 384_256 512)
|
||
|
add_executable(bn_c${bit}_test bn_c${bit}_test.cpp)
|
||
|
target_link_libraries(bn_c${bit}_test PRIVATE mcl::mclbn${bit})
|
||
|
set_target_properties(bn_c${bit}_test PROPERTIES
|
||
|
CXX_STANDARD 11
|
||
|
CXX_STANDARD_REQUIRED YES
|
||
|
CXX_EXTENSIONS NO)
|
||
|
target_compile_options(bn_c${bit}_test PRIVATE ${MCL_COMPILE_OPTIONS})
|
||
|
target_compile_definitions(bn_c${bit}_test PRIVATE MCLBN_DONT_EXPORT)
|
||
|
add_test(NAME bn_c${bit}_test COMMAND bn_c${bit}_test)
|
||
|
endforeach()
|
||
|
|
||
|
# Tests for mclsheXXX
|
||
|
foreach(bit IN ITEMS 256 384 384_256)
|
||
|
add_executable(she_c${bit}_test she_c${bit}_test.cpp)
|
||
|
target_link_libraries(she_c${bit}_test PRIVATE mcl::mclshe${bit})
|
||
|
set_target_properties(she_c${bit}_test PROPERTIES
|
||
|
CXX_STANDARD 11
|
||
|
CXX_STANDARD_REQUIRED YES
|
||
|
CXX_EXTENSIONS NO)
|
||
|
target_compile_options(she_c${bit}_test PRIVATE ${MCL_COMPILE_OPTIONS})
|
||
|
target_compile_definitions(she_c${bit}_test PRIVATE MCLBN_DONT_EXPORT)
|
||
|
add_test(NAME she_c${bit}_test COMMAND she_c${bit}_test)
|
||
|
endforeach()
|
||
|
|
||
|
# ecdsa_test
|
||
|
add_executable(ecdsa_test ecdsa_test.cpp)
|
||
|
target_link_libraries(ecdsa_test PRIVATE mcl::mclecdsa)
|
||
|
set_target_properties(ecdsa_test PROPERTIES
|
||
|
CXX_STANDARD 11
|
||
|
CXX_STANDARD_REQUIRED YES
|
||
|
CXX_EXTENSIONS NO)
|
||
|
target_compile_options(ecdsa_test PRIVATE ${MCL_COMPILE_OPTIONS})
|
||
|
target_compile_definitions(ecdsa_test PRIVATE MCLBN_DONT_EXPORT)
|
||
|
add_test(NAME ecdsa_test COMMAND ecdsa_test)
|
||
|
|
||
|
# ecdsa_c_test
|
||
|
add_executable(ecdsa_c_test ecdsa_c_test.cpp)
|
||
|
target_link_libraries(ecdsa_c_test PRIVATE mcl::mclecdsa)
|
||
|
set_target_properties(ecdsa_c_test PROPERTIES
|
||
|
CXX_STANDARD 11
|
||
|
CXX_STANDARD_REQUIRED YES
|
||
|
CXX_EXTENSIONS NO)
|
||
|
target_compile_options(ecdsa_c_test PRIVATE ${MCL_COMPILE_OPTIONS})
|
||
|
target_compile_definitions(ecdsa_c_test PRIVATE MCLBN_DONT_EXPORT)
|
||
|
add_test(NAME ecdsa_c_test COMMAND ecdsa_c_test)
|