2015-11-13 21:09:47 +00:00
|
|
|
include_directories(../../include)
|
|
|
|
|
2015-11-17 23:41:34 +00:00
|
|
|
if (${ARCH} STREQUAL "arm")
|
|
|
|
set(
|
|
|
|
CURVE25519_ARCH_SOURCES
|
|
|
|
|
2016-01-04 15:13:00 +00:00
|
|
|
asm/x25519-asm-arm.S
|
2015-11-17 23:41:34 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2015-11-20 22:41:50 +00:00
|
|
|
if (${ARCH} STREQUAL "x86_64")
|
|
|
|
set(
|
|
|
|
CURVE25519_ARCH_SOURCES
|
|
|
|
|
2016-01-04 15:13:00 +00:00
|
|
|
asm/x25519-asm-x86_64.S
|
2015-11-20 22:41:50 +00:00
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2015-11-13 21:09:47 +00:00
|
|
|
add_library(
|
|
|
|
curve25519
|
|
|
|
|
|
|
|
OBJECT
|
|
|
|
|
|
|
|
curve25519.c
|
2016-02-10 02:09:00 +00:00
|
|
|
spake25519.c
|
2015-11-20 22:41:50 +00:00
|
|
|
x25519-x86_64.c
|
2015-11-17 23:41:34 +00:00
|
|
|
|
|
|
|
${CURVE25519_ARCH_SOURCES}
|
2015-11-13 21:09:47 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(
|
|
|
|
ed25519_test
|
|
|
|
|
|
|
|
ed25519_test.cc
|
|
|
|
$<TARGET_OBJECTS:test_support>
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(ed25519_test crypto)
|
2015-11-18 03:27:41 +00:00
|
|
|
add_dependencies(all_tests ed25519_test)
|