forked from OxHainan/cloak-tee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (33 loc) · 1.34 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
cmake_minimum_required(VERSION 3.11)
add_definitions(-DOE_API_VERSION=2)
set(CMAKE_CXX_STANDARD 17)
# Paths to dependencies - currently explicit
set(CCF_DIR "/opt/ccf-0.15.2" CACHE PATH "Path to CCF install")
set(EVM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/eEVM)
include(${CCF_DIR}/cmake/preproject.cmake)
project(evm-for-ccf LANGUAGES C CXX)
include(${CCF_DIR}/cmake/tools.cmake)
include(${CCF_DIR}/cmake/ccf.cmake)
include(${CCF_DIR}/cmake/ccf_app.cmake)
add_subdirectory(${EVM_DIR}/3rdparty)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tests/setup_env.sh ${CMAKE_CURRENT_BINARY_DIR}/tests.sh COPYONLY)
option(RECORD_TRACE "Record a detailed trace of EVM execution when transaction fails" OFF)
if(RECORD_TRACE)
add_definitions(-DRECORD_TRACE)
endif(RECORD_TRACE)
option(CLOAK_DEBUG_LOGGING "Enable cloak debug logging" OFF)
if(CLOAK_DEBUG_LOGGING)
add_compile_definitions(CLOAK_DEBUG_LOGGING)
endif()
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/evm4ccf.app.cmake)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/install.cmake)
option(BUILD_TESTS "Build tests" OFF)
if (BUILD_TESTS)
enable_testing()
add_compile_definitions(DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/evm4ccf.tests.cmake)
endif()
option(CLANG_FORMAT "Enable clang format" OFF)
if(CLANG_FORMAT)
include(${CMAKE_CURRENT_SOURCE_DIR}/cmake/install.cmake)
endif()