solidity/CMakeLists.txt

53 lines
1.4 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 3.0.0)
2015-08-19 12:57:25 +00:00
Make the Solidity repository standalone. This commit is the culmination of several months of work to decouple Solidity from the webthree-umbrella so that it can be developed in parallel with cpp-ethereum (the Ethereum C++ runtime) and so that even for the Solidity unit-tests there is no hard-dependency onto the C++ runtime. The Tests-over-IPC refactoring was a major step in the same process which was already committed. This commit contains the following changes: - A subset of the CMake functionality in webthree-helpers was extracted and tailored for Solidity into ./cmake. Further cleanup is certainly possible. - A subset of the libdevcore functionality in libweb3core was extracted and tailored for Solidity into ./libdevcore. Further cleanup is certainly possible - The gas price constants in EVMSchedule were orphaned into libevmasm. - Some other refactorings and cleanups were made to sever unnecessary EVM dependencies in the Solidity unit-tests. - TravisCI and Appveyor support was added, covering builds and running of the unit-tests (Linux and macOS only for now) - A bug-fix was made to get the Tests-over-IPC running on macOS. - There are still reliability issues in the unit-tests, which need immediate attention. The Travis build has been flipped to run the unit-tests 5 times, to try to flush these out. - The Emscripten automation which was previously in webthree-umbrella was merged into the TravisCI automation here. - The development ZIP deployment step has been commented out, but we will want to read that ONLY for release branch. Further iteration on these changes will definitely be needed, but I feel these have got to sufficient maturity than holding them back further isn't winning us anything. It is go time :-)
2016-08-01 05:25:37 +00:00
set(ETH_CMAKE_DIR "${CMAKE_CURRENT_LIST_DIR}/cmake" CACHE PATH "The the path to the cmake directory")
2015-08-19 12:57:25 +00:00
list(APPEND CMAKE_MODULE_PATH ${ETH_CMAKE_DIR})
# Set cmake_policies
include(EthPolicy)
eth_policy()
# project name and version should be set after cmake_policy CMP0048
2017-08-09 09:40:46 +00:00
set(PROJECT_VERSION "0.4.16")
project(solidity VERSION ${PROJECT_VERSION})
2017-08-22 20:50:03 +00:00
option(SOLC_LINK_STATIC "Link solc executable statically on supported platforms" OFF)
# Let's find our dependencies
2015-08-19 12:57:25 +00:00
include(EthDependencies)
include(deps/jsoncpp.cmake)
2017-08-22 14:37:27 +00:00
find_package(Threads)
# Figure out what compiler and system are we using
2015-08-19 12:57:25 +00:00
include(EthCompilerSettings)
# Include utils
include(EthUtils)
2015-08-19 12:57:25 +00:00
# Create license.h from LICENSE.txt and template
2017-06-14 10:42:48 +00:00
# Converting to char array is required due to MSVC's string size limit.
file(READ ${CMAKE_SOURCE_DIR}/LICENSE.txt LICENSE_TEXT HEX)
string(REGEX MATCHALL ".." LICENSE_TEXT "${LICENSE_TEXT}")
2017-06-14 12:17:53 +00:00
string(REGEX REPLACE ";" ",\n\t0x" LICENSE_TEXT "${LICENSE_TEXT}")
set(LICENSE_TEXT "0x${LICENSE_TEXT}")
2017-06-14 10:42:48 +00:00
configure_file("${CMAKE_SOURCE_DIR}/cmake/templates/license.h.in" "license.h")
include(EthOptions)
2015-09-16 13:55:25 +00:00
configure_project(TESTS)
Make the Solidity repository standalone. This commit is the culmination of several months of work to decouple Solidity from the webthree-umbrella so that it can be developed in parallel with cpp-ethereum (the Ethereum C++ runtime) and so that even for the Solidity unit-tests there is no hard-dependency onto the C++ runtime. The Tests-over-IPC refactoring was a major step in the same process which was already committed. This commit contains the following changes: - A subset of the CMake functionality in webthree-helpers was extracted and tailored for Solidity into ./cmake. Further cleanup is certainly possible. - A subset of the libdevcore functionality in libweb3core was extracted and tailored for Solidity into ./libdevcore. Further cleanup is certainly possible - The gas price constants in EVMSchedule were orphaned into libevmasm. - Some other refactorings and cleanups were made to sever unnecessary EVM dependencies in the Solidity unit-tests. - TravisCI and Appveyor support was added, covering builds and running of the unit-tests (Linux and macOS only for now) - A bug-fix was made to get the Tests-over-IPC running on macOS. - There are still reliability issues in the unit-tests, which need immediate attention. The Travis build has been flipped to run the unit-tests 5 times, to try to flush these out. - The Emscripten automation which was previously in webthree-umbrella was merged into the TravisCI automation here. - The development ZIP deployment step has been commented out, but we will want to read that ONLY for release branch. Further iteration on these changes will definitely be needed, but I feel these have got to sufficient maturity than holding them back further isn't winning us anything. It is go time :-)
2016-08-01 05:25:37 +00:00
add_subdirectory(libdevcore)
2016-03-21 18:37:15 +00:00
add_subdirectory(libevmasm)
add_subdirectory(libsolidity)
add_subdirectory(solc)
if (NOT EMSCRIPTEN)
2016-03-21 18:36:01 +00:00
add_subdirectory(liblll)
2016-03-21 18:32:42 +00:00
add_subdirectory(lllc)
endif()
2015-08-19 12:57:25 +00:00
if (TESTS AND NOT EMSCRIPTEN)
add_subdirectory(test)
endif()