Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ LIST(APPEND CMAKE_MODULE_PATH "${PDO_SOURCE_ROOT}/contracts/wawaka")
INCLUDE(contract-build)
INCLUDE(wawaka_common)

# This switch is not necessary in general. However, it is
# extremely helpful for reducing the size of large contracts
LIST(APPEND WASM_LINK_OPTIONS "-Wl,--strip-all")

LIST(APPEND WASM_LIBRARIES ${WW_COMMON_LIB})
LIST(APPEND WASM_INCLUDES ${WW_COMMON_INCLUDES})

Expand Down
7 changes: 6 additions & 1 deletion cmake/ProjectVariables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@
# * PDO_INSTALL_ROOT
# * PDO_CONTRACT_VERSION

SET(PDO_CONTRACTS_ROOT ${CMAKE_SOURCE_DIR})
IF (DEFINED ENV{PDO_CONTRACTS_ROOT})
SET(PDO_CONTRACTS_ROOT $ENV{PDO_CONTRACTS_ROOT})
ENDIF()

IF (NOT DEFINED ENV{PDO_SOURCE_ROOT})
MESSAGE(FATAL_ERROR "PDO_SOURCE_ROOT not defined")
ENDIF()
Expand All @@ -35,7 +40,7 @@ SET(PDO_JUPYTER_ROOT ${PDO_INSTALL_ROOT}/opt/pdo/notebooks)
# without any annotated version tags)
EXECUTE_PROCESS(
COMMAND ./get_version
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bin
WORKING_DIRECTORY ${PDO_CONTRACTS_ROOT}/bin
OUTPUT_VARIABLE PDO_CONTRACT_VERSION
ERROR_QUIET
OUTPUT_STRIP_TRAILING_WHITESPACE
Expand Down