forked from PlatONnetwork/emp-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt_bak
64 lines (53 loc) · 1.66 KB
/
CMakeLists.txt_bak
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required (VERSION 2.8.11)
project (emptool)
set(NAME "emp-tool")
include(cmake/common.cmake)
include(cmake/source_of_randomness.cmake)
include(cmake/threading.cmake)
find_package(OpenSSL REQUIRED)
if(OT_NP_USE_MIRACL)
ADD_DEFINITIONS(-DOT_NP_USE_MIRACL=1)
link_directories(../miracl/build)
link_libraries(miracl)
else()
find_package(relic REQUIRED)
find_package(GMP REQUIRED)
link_libraries(${OPENSSL_LIBRARIES})
link_libraries(${RELIC_LIBRARIES})
endif()
#find_package(relic REQUIRED)
#find_package(GMP REQUIRED)
find_package(Boost REQUIRED COMPONENTS system)
include_directories(${RELIC_INCLUDE_DIR} ${OPENSSL_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${GMP_INCLUDE_DIR})
include_directories(../miracl/include)
# Installation
#source list
aux_source_directory(. sources)
aux_source_directory(./emp-tool/io sources)
aux_source_directory(./emp-tool/gc sources)
aux_source_directory(./emp-tool/garble sources)
aux_source_directory(./emp-tool/circuits sources)
aux_source_directory(./emp-tool/utils sources)
aux_source_directory(./emp-tool/execution sources)
aux_source_directory(./emp-tool sources)
message(STATUS "sources: ${sources}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-function")
link_libraries(${GMP_LIBRARIES})
add_library(${NAME} SHARED ${sources})
install(DIRECTORY emp-tool DESTINATION include/)
install(DIRECTORY cmake/ DESTINATION cmake/)
install(TARGETS ${NAME} DESTINATION lib)
# Test cases
macro (add_test _name)
add_test_with_lib(${_name} "")
endmacro()
add_test(prg)
add_test(hash)
add_test(prp)
add_test(com)
add_test(netio)
add_test(bit)
add_test(int)
add_test(float)
add_test(garble)
add_test(gen_circuit)