|
|
|
@ -37,6 +37,11 @@ option( |
|
|
|
|
"use base64.ll with -DCMAKE_CXX_COMPILER=clang++" |
|
|
|
|
OFF |
|
|
|
|
) |
|
|
|
|
option( |
|
|
|
|
ONLY_LIB |
|
|
|
|
"only lib" |
|
|
|
|
OFF |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) |
|
|
|
|
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib) |
|
|
|
@ -188,15 +193,17 @@ install(FILES ${MCL_HEADERS} DESTINATION include/mcl) |
|
|
|
|
install(FILES include/mcl/impl/bn_c_impl.hpp DESTINATION include/mcl/impl) |
|
|
|
|
install(FILES ${CYBOZULIB_HEADERS} DESTINATION include/cybozu) |
|
|
|
|
|
|
|
|
|
set(TEST_BASE fp_test ec_test fp_util_test window_method_test elgamal_test fp_tower_test gmp_test bn_test glv_test) |
|
|
|
|
#set(TEST_BASE bn_test) |
|
|
|
|
foreach(base IN ITEMS ${TEST_BASE}) |
|
|
|
|
add_executable( |
|
|
|
|
${base} |
|
|
|
|
test/${base}.cpp |
|
|
|
|
) |
|
|
|
|
target_link_libraries( |
|
|
|
|
${base} |
|
|
|
|
${LIBS} |
|
|
|
|
) |
|
|
|
|
endforeach() |
|
|
|
|
if(NOT ONLY_LIB) |
|
|
|
|
set(TEST_BASE fp_test ec_test fp_util_test window_method_test elgamal_test fp_tower_test gmp_test bn_test glv_test) |
|
|
|
|
#set(TEST_BASE bn_test) |
|
|
|
|
foreach(base IN ITEMS ${TEST_BASE}) |
|
|
|
|
add_executable( |
|
|
|
|
${base} |
|
|
|
|
test/${base}.cpp |
|
|
|
|
) |
|
|
|
|
target_link_libraries( |
|
|
|
|
${base} |
|
|
|
|
${LIBS} |
|
|
|
|
) |
|
|
|
|
endforeach() |
|
|
|
|
endif() |
|
|
|
|