forked from EOSIO/eosio.contracts
-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
46 lines (38 loc) · 1.76 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
cmake_minimum_required(VERSION 3.5)
project(eosio_contracts VERSION 1.5.1)
set(EOSIO_CDT_VERSION_MIN "1.4")
set(EOSIO_CDT_VERSION_SOFT_MAX "1.4")
#set(EOSIO_CDT_VERSION_HARD_MAX "")
find_package(eosio.cdt)
### Check the version of eosio.cdt
set(VERSION_MATCH_ERROR_MSG "")
EOSIO_CHECK_VERSION(VERSION_OUTPUT "${EOSIO_CDT_VERSION}"
"${EOSIO_CDT_VERSION_MIN}"
"${EOSIO_CDT_VERSION_SOFT_MAX}"
"${EOSIO_CDT_VERSION_HARD_MAX}"
VERSION_MATCH_ERROR_MSG)
if(VERSION_OUTPUT STREQUAL "MATCH")
message(STATUS "Using eosio.cdt version ${EOSIO_CDT_VERSION}")
elseif(VERSION_OUTPUT STREQUAL "WARN")
message(WARNING "Using eosio.cdt version ${EOSIO_CDT_VERSION} even though it exceeds the maximum supported version of ${EOSIO_CDT_VERSION_SOFT_MAX}; continuing with configuration, however build may fail.\nIt is recommended to use eosio.cdt version ${EOSIO_CDT_VERSION_SOFT_MAX}.x")
else() # INVALID OR MISMATCH
message(FATAL_ERROR "Found eosio.cdt version ${EOSIO_CDT_VERSION} but it does not satisfy version requirements: ${VERSION_MATCH_ERROR_MSG}\nPlease use eosio.cdt version ${EOSIO_CDT_VERSION_SOFT_MAX}.x")
endif(VERSION_OUTPUT STREQUAL "MATCH")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(TEST_BUILD_TYPE "Debug")
set(CMAKE_BUILD_TYPE "Release")
else()
set(TEST_BUILD_TYPE ${CMAKE_BUILD_TYPE})
endif()
add_subdirectory(eosio.bios)
add_subdirectory(eosio.msig)
add_subdirectory(eosio.wrap)
add_subdirectory(eosio.system)
add_subdirectory(eosio.token)
if (APPLE)
set(OPENSSL_ROOT "/usr/local/opt/openssl")
elseif (UNIX)
set(OPENSSL_ROOT "/usr/include/openssl")
endif()
set(SECP256K1_ROOT "/usr/local")
include(UnitTestsExternalProject.txt)