-
Notifications
You must be signed in to change notification settings - Fork 10
/
CMakeLists.txt
47 lines (35 loc) · 1.05 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
cmake_minimum_required(VERSION 3.5.1)
# Define build mode
set(BUILD_MODE
"wasm"
CACHE STRING "Select build mode for libverification(host|wasm)")
# Print build mode
message(STATUS "Build Mode: ${BUILD_MODE}")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if(BUILD_MODE STREQUAL "wasm")
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Emscripten.cmake")
set(WASM 1)
add_definitions(-DWASM)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -sMAIN_MODULE=2 -fPIC -fexceptions -O3")
elseif()
endif()
project(trustflow)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(Abseil)
include(ApisProto)
include(Cppcodec)
include(DcapVerifier)
include(Fmtlib)
include(Openssl)
include(Protobuf)
include(SgxHeaders)
include(Yacl)
include(Spdlog)
include(CsvHeader)
# include(Pybind)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(trustflow/attestation/verification)
add_subdirectory(pylib/trustflow/attestation/verification)