-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
64 lines (50 loc) · 2.18 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
56
57
58
59
60
61
62
63
64
# Copyright 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
CMAKE_MINIMUM_REQUIRED(VERSION 3.16 FATAL_ERROR)
PROJECT(pdo-contracts)
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}")
LIST(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
INCLUDE(ProjectVariables)
LIST(APPEND CMAKE_MODULE_PATH "${PDO_SOURCE_ROOT}/contracts/wawaka")
INCLUDE(contract-build)
INCLUDE(wawaka_common)
LIST(APPEND WASM_LIBRARIES ${WW_COMMON_LIB})
LIST(APPEND WASM_INCLUDES ${WW_COMMON_INCLUDES})
FILE(GLOB CONTRACT_FAMILIES "*-contract")
# A local cmake file (Local.cmake) allows for local overrides of
# variables. In particular, this is useful to set CONTRACT_FAMILIES
# to just the subset that you want to build/test.
#
# For example, if you place this line in Local.cmake then only the
# exchange and digital asset contract families will be built:
#
# SET(CONTRACT_FAMILIES exchange-contract digital-asset-contract)
#
INCLUDE(Local.cmake OPTIONAL)
ENABLE_TESTING()
FOREACH(FAMILY IN ITEMS ${CONTRACT_FAMILIES})
ADD_SUBDIRECTORY(${FAMILY})
ENDFOREACH()
# -----------------------------------------------------------------
# install the jupyter notebooks, note that the trailing slash here
# is significant and should not be removed; it prevents the notebooks
# directory being prepended to the copied name
# -----------------------------------------------------------------
INCLUDE(Jupyter)
FILE(GLOB_RECURSE NOTEBOOK_SOURCES docs/notebooks/*.py docs/notebooks/*.md)
CONVERT_JUPYTEXT(ROOT_NOTEBOOKS ${NOTEBOOK_SOURCES})
ADD_CUSTOM_TARGET(root-notebooks ALL DEPENDS ${ROOT_NOTEBOOKS})
INSTALL(DIRECTORY docs/notebooks/
DESTINATION "${PDO_JUPYTER_ROOT}/"
FILES_MATCHING PATTERN "*.ipynb" PATTERN "*.png")