Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into state-history-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
tbfleming committed Oct 16, 2018
2 parents 66d2618 + 22e45ae commit 8d9f326
Show file tree
Hide file tree
Showing 31 changed files with 462 additions and 1,388 deletions.
20 changes: 20 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<!-- PLEASE FILL OUT THE FOLLOWING MARKDOWN TEMPLATE -->
<!-- Give your PR a title that is sufficient to understand what is being changed. -->

**Change Description**

<!-- Describe the change you made, the motivation for it, and the impact it will have. Reference issues or pull requests where possible (use '#XX' or 'GH-XX' where XX is the issue or pull request number). -->

**Consensus Changes**

<!-- If this PR introduces a change to the validation of blocks in the chain or consensus in general, please describe the impact. -->


**API Changes**

<!-- If this PR introduces API changes, please describe the changes here. What will developers need to know before upgrading to this version? -->


**Documentation Additions**

<!-- List all the information that needs to be added to the documentation after merge. -->
32 changes: 26 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ if(ENABLE_COVERAGE_TESTING)
find_program( GENHTML_PATH NAMES genhtml)
endif()

include(utils)
add_subdirectory( externals )

if ("${CORE_SYMBOL_NAME}" STREQUAL "")
Expand All @@ -207,7 +208,6 @@ endif()
message( STATUS "Using '${EOSIO_ROOT_KEY}' as public key for 'eosio' account" )

include(wasm)

add_subdirectory( libraries )
add_subdirectory( contracts )
add_subdirectory( plugins )
Expand All @@ -228,9 +228,30 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/testnet.template ${CMAKE_CURRENT_BINA
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/eosio.version.in ${CMAKE_CURRENT_BINARY_DIR}/eosio.version.hpp)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/eosio.version.hpp DESTINATION ${CMAKE_INSTALL_FULL_INCLUDEDIR})

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/EosioTester.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/EosioTester.cmake @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules/EosioTesterBuild.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/EosioTester.cmake @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/EosioTester.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/)
set(EOS_ROOT_DIR ${CMAKE_BINARY_DIR})
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/eosio-config.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/eosio/eosio-config.cmake @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/EosioTesterBuild.cmake.in ${CMAKE_BINARY_DIR}/lib/cmake/eosio/EosioTester.cmake @ONLY)

set(EOS_ROOT_DIR ${CMAKE_INSTALL_PREFIX})
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/eosio-config.cmake.in ${CMAKE_BINARY_DIR}/modules/eosio-config.cmake @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/modules/eosio-config.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/eosio)
configure_file(${CMAKE_SOURCE_DIR}/CMakeModules/EosioTester.cmake.in ${CMAKE_BINARY_DIR}/modules/EosioTester.cmake @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/modules/EosioTester.cmake DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}/cmake/eosio)

configure_file(${CMAKE_SOURCE_DIR}/LICENSE
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/wabt/LICENSE
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.wabt COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/softfloat/COPYING.txt
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.softfloat COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/wasm-jit/LICENSE
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.wavm COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/fc/secp256k1/upstream/COPYING
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.secp256k1 COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/libraries/fc/src/network/LICENSE.go
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.go COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/externals/binaryen/LICENSE
${CMAKE_BINARY_DIR}/licenses/eosio/LICENSE.binaryen COPYONLY)

install(FILES LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/)
install(FILES libraries/wabt/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ RENAME LICENSE.wabt)
Expand All @@ -240,6 +261,5 @@ install(FILES libraries/fc/secp256k1/upstream/COPYING DESTINATION ${CMAKE_INSTAL
install(FILES externals/binaryen/LICENSE DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ RENAME LICENSE.binaryen)
install(FILES libraries/fc/src/network/LICENSE.go DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/licenses/eosio/ )

include(installer)

include(package)
include(doxygen)
1 change: 1 addition & 0 deletions CMakeModules/EosioTester.cmake.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required( VERSION 3.5 )
message(STATUS "Setting up Eosio Tester @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ at @EOS_ROOT_DIR@")

set(CMAKE_CXX_COMPILER @CMAKE_CXX_COMPILER@)
set(CMAKE_C_COMPILER @CMAKE_C_COMPILER@)
Expand Down
1 change: 1 addition & 0 deletions CMakeModules/EosioTesterBuild.cmake.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cmake_minimum_required( VERSION 3.5 )
message(STATUS "Setting up Eosio Tester @VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_PATCH@ at @EOS_ROOT_DIR@")

set(CMAKE_CXX_COMPILER @CMAKE_CXX_COMPILER@)
set(CMAKE_C_COMPILER @CMAKE_C_COMPILER@)
Expand Down
96 changes: 96 additions & 0 deletions CMakeModules/eosio-config.cmake.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
if(EOSIO_ROOT STREQUAL "" OR NOT EOSIO_ROOT)
set(EOSIO_ROOT "@EOS_ROOT_DIR@")
endif()
list(APPEND CMAKE_MODULE_PATH ${EOSIO_ROOT}/lib/cmake/eosio)
include(EosioTester)

function(EXTRACT_MAJOR_MINOR_FROM_VERSION version success major minor)
string(REGEX REPLACE "^([0-9]+)\\..+$" "\\1" _major "${version}")
if("${_major}" STREQUAL "${version}")
set(${success} FALSE PARENT_SCOPE)
return()
endif()

string(REGEX REPLACE "^[0-9]+\\.([0-9]+)(\\..*)?$" "\\1" _minor "${version}")
if("${_minor}" STREQUAL "${version}")
set(success FALSE PARENT_SCOPE)
return()
endif()

set(${major} ${_major} PARENT_SCOPE)
set(${minor} ${_minor} PARENT_SCOPE)
set(${success} TRUE PARENT_SCOPE)
endfunction(EXTRACT_MAJOR_MINOR_FROM_VERSION)

function(EOSIO_CHECK_VERSION output version hard_min soft_max hard_max) # optional 6th argument for error message
set(${output} "INVALID" PARENT_SCOPE)

EXTRACT_MAJOR_MINOR_FROM_VERSION("${version}" success major minor)
if(NOT success)
if(${ARGC} GREATER 5)
set(${ARGV5} "version '${version}' is invalid" PARENT_SCOPE)
endif()
return()
endif()

EXTRACT_MAJOR_MINOR_FROM_VERSION("${hard_min}" success hard_min_major hard_min_minor)
if(NOT success)
if(${ARGC} GREATER 5)
set(${ARGV5} "hard minimum version '${hard_min}' is invalid" PARENT_SCOPE)
endif()
return()
endif()

if( "${major}.${minor}" VERSION_LESS "${hard_min_major}.${hard_min_minor}" )
set(${output} "MISMATCH" PARENT_SCOPE)
if(${ARGC} GREATER 5)
set(${ARGV5} "version '${version}' does not meet hard minimum version requirement of ${hard_min_major}.${hard_min_minor}" PARENT_SCOPE)
endif()
return()
endif()

if(NOT hard_max STREQUAL "")
EXTRACT_MAJOR_MINOR_FROM_VERSION("${hard_max}" success hard_max_major hard_max_minor)
if(NOT success)
if(${ARGC} GREATER 5)
set(${ARGV5} "hard maximum version '${hard_max}' is invalid" PARENT_SCOPE)
endif()
return()
endif()

if( "${major}.${minor}" VERSION_GREATER "${hard_max_major}.${hard_max_minor}" )
set(${output} "MISMATCH" PARENT_SCOPE)
if(${ARGC} GREATER 5)
set(${ARGV5} "version '${version}' does not meet hard maximum version requirement of ${hard_max_major}.${hard_max_minor}" PARENT_SCOPE)
endif()
return()
endif()
endif()

EXTRACT_MAJOR_MINOR_FROM_VERSION("${soft_max}" success soft_max_major soft_max_minor)
if(NOT success)
set(${output} "MISMATCH" PARENT_SCOPE)
if(${ARGC} GREATER 5)
set(${ARGV5} "soft maximum version '${soft_max}' is invalid" PARENT_SCOPE)
endif()
return()
endif()

if( ${major} GREATER ${soft_max_major} )
set(${output} "MISMATCH" PARENT_SCOPE)
if(${ARGC} GREATER 5)
set(${ARGV5} "version '${version}' must have the same major version as the soft maximum version (${soft_max_major})" PARENT_SCOPE)
endif()
return()
endif()

if( "${major}.${minor}" VERSION_GREATER "${soft_max_major}.${soft_max_minor}" )
set(${output} "WARN" PARENT_SCOPE)
if(${ARGC} GREATER 5)
set(${ARGV5} "version '${version}' matches requirements but is greater than the soft maximum version of ${soft_max_major}.${soft_max_minor}" PARENT_SCOPE)
endif()
return()
endif()

set(${output} "MATCH" PARENT_SCOPE)
endfunction(EOSIO_CHECK_VERSION)
11 changes: 11 additions & 0 deletions CMakeModules/package.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
set(VENDOR "block.one")
set(PROJECT_NAME "eosio")
set(DESC "Software for the EOS.IO network")
set(URL "https://github.com/eosio/eos")
set(EMAIL "[email protected]")

configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_package.sh.in ${CMAKE_BINARY_DIR}/packages/generate_package.sh @ONLY)
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_bottle.sh ${CMAKE_BINARY_DIR}/packages/generate_bottle.sh COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_deb.sh ${CMAKE_BINARY_DIR}/packages/generate_deb.sh COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_rpm.sh ${CMAKE_BINARY_DIR}/packages/generate_rpm.sh COPYONLY)
configure_file(${CMAKE_SOURCE_DIR}/scripts/generate_tarball.sh ${CMAKE_BINARY_DIR}/packages/generate_tarball.sh COPYONLY)
4 changes: 4 additions & 0 deletions CMakeModules/utils.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
macro( copy_bin file )
add_custom_command( TARGET ${file} POST_BUILD COMMAND mkdir -p ${CMAKE_BINARY_DIR}/bin )
add_custom_command( TARGET ${file} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/${file} ${CMAKE_BINARY_DIR}/bin/ )
endmacro( copy_bin )
1 change: 0 additions & 1 deletion contracts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ add_subdirectory(test_ram_limit)
#add_subdirectory(social)
add_subdirectory(eosio.bios)
add_subdirectory(noop)
add_subdirectory(dice)
add_subdirectory(tic_tac_toe)
add_subdirectory(payloadless)
add_subdirectory(integration_test)
Expand Down
8 changes: 0 additions & 8 deletions contracts/dice/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 8d9f326

Please sign in to comment.