-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
40 lines (32 loc) · 1.08 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
cmake_minimum_required(VERSION 3.10)
project(pvc)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
#set(CMAKE_BUILD_TYPE None)
if("${LATTICEZKSNARK_DIR}" STREQUAL "")
set(
LATTICEZKSNARK_DIR
"${CMAKE_CURRENT_SOURCE_DIR}/depends/lattice-zksnark"
)
else()
set(LIBSNARK_DIR "${LIBSNARK_DIR}")
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# Common compilation flags and warning configuration
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -Wall -Wextra -Wfatal-errors -pthread -maes -msse2 -msse3 -mpopcnt")
########### TEMPORARY ###########
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-range-loop-construct -Wno-deprecated -ftemplate-backtrace-limit=0")
if("${MULTICORE}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fopenmp")
endif()
# Default optimizations flags (to override, use -DOPT_FLAGS=...)
if("${OPT_FLAGS}" STREQUAL "")
set(OPT_FLAGS "-ggdb3 -O2 -march=native -mtune=native")
endif()
endif()
set(
CMAKE_CXX_FLAGS
"${CMAKE_CXX_FLAGS} ${OPT_FLAGS}"
)
include_directories(.)
add_subdirectory(depends)
add_subdirectory(vfhe)