| 1 |
add_library( |
| 2 |
newhope |
| 3 |
|
| 4 |
OBJECT |
| 5 |
|
| 6 |
error_correction.c |
| 7 |
newhope.c |
| 8 |
ntt.c |
| 9 |
poly.c |
| 10 |
precomp.c |
| 11 |
reduce.c |
| 12 |
) |
| 13 |
|
| 14 |
if(ENABLE_TESTS) |
| 15 |
add_executable( |
| 16 |
newhope_test |
| 17 |
|
| 18 |
newhope_test.cc |
| 19 |
$<TARGET_OBJECTS:test_support> |
| 20 |
) |
| 21 |
|
| 22 |
add_executable( |
| 23 |
newhope_statistical_test |
| 24 |
|
| 25 |
newhope_statistical_test.cc |
| 26 |
$<TARGET_OBJECTS:test_support> |
| 27 |
) |
| 28 |
|
| 29 |
add_executable( |
| 30 |
newhope_vectors_test |
| 31 |
|
| 32 |
newhope_vectors_test.cc |
| 33 |
$<TARGET_OBJECTS:test_support> |
| 34 |
) |
| 35 |
|
| 36 |
target_link_libraries(newhope_test crypto) |
| 37 |
target_link_libraries(newhope_statistical_test crypto) |
| 38 |
target_link_libraries(newhope_vectors_test crypto) |
| 39 |
add_dependencies(all_tests newhope_test) |
| 40 |
add_dependencies(all_tests newhope_statistical_test) |
| 41 |
add_dependencies(all_tests newhope_vectors_test) |
| 42 |
endif() |