-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
55 lines (40 loc) · 1.39 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.25)
project(PSI)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_compile_options(-Wall)
#add_compile_options(-fsanitize=address)
add_compile_options(-g -ggdb)
# Set default build type to Release if not specified
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)
endif ()
if (CMAKE_BUILD_TYPE MATCHES Debug)
add_compile_options(-O0)
endif ()
if (CMAKE_BUILD_TYPE MATCHES Release)
add_compile_options(-O2)
endif ()
file(GLOB SOURCES "src/*/*.cpp" "src/*/*.hpp" "src/*.cpp" "src/*.hpp")
add_executable(psi ${SOURCES})
target_include_directories(psi PUBLIC cuckoofilter)
#set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_DEBUG_RUNTIME OFF)
find_package(libOTe REQUIRED
PATHS ../../dev/libOTe
NO_DEFAULT_PATH
NO_CMAKE_ENVIRONMENT_PATH
NO_CMAKE_PATH
NO_SYSTEM_ENVIRONMENT_PATH
NO_CMAKE_SYSTEM_PATH
NO_CMAKE_FIND_ROOT_PATH)
target_link_libraries(psi oc::libOTe)
find_package(OpenSSL REQUIRED)
if(OPENSSL_FOUND)
message(STATUS "OpenSSL Version: ${OPENSSL_VERSION}")
message(STATUS "OpenSSL Include Dir: ${OPENSSL_INCLUDE_DIR}")
message(STATUS "OpenSSL Libraries: ${OPENSSL_LIBRARIES}")
include_directories(${OPENSSL_INCLUDE_DIR})
link_directories(${OPENSSL_LIBRARIES})
endif()
target_link_libraries(psi ${OPENSSL_LIBRARIES})