Browse Source

Much nicer build presets.

cl-refactor
Gav Wood 10 years ago
parent
commit
e97072c24f
  1. 74
      CMakeLists.txt

74
CMakeLists.txt

@ -14,11 +14,6 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# user defined, defaults
# Normally, set(...CACHE...) creates cache variables, but does not modify them.
function(createDefaultCacheConfig)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(DECENT_PLATFORM OFF)
else ()
set(DECENT_PLATFORM ON)
endif ()
set(VMTRACE OFF CACHE BOOL "VM tracing and run-time checks (useful for cross-implementation VM debugging)")
set(PARANOIA OFF CACHE BOOL "Additional run-time checks")
set(JSONRPC ON CACHE BOOL "Build with jsonprc. default on")
@ -26,11 +21,11 @@ function(createDefaultCacheConfig)
set(USENPM OFF CACHE BOOL "Use npm to recompile ethereum.js if it was changed")
set(PROFILING OFF CACHE BOOL "Build in support for profiling")
set(BUNDLE "full" CACHE STRING "Predefined bundle of software to build.")
set(BUNDLE "none" CACHE STRING "Predefined bundle of software to build (none, full, user, tests, minimal).")
set(SOLIDITY ON CACHE BOOL "Build the Solidity language components")
set(SERPENT ${DECENT_PLATFORM} CACHE BOOL "Build the Serpent language components")
set(SERPENT ON CACHE BOOL "Build the Serpent language components")
set(TOOLS ON CACHE BOOL "Build the tools components")
set(NCURSES ${DECENT_PLATFORM} CACHE BOOL "Build the NCurses components")
set(NCURSES ON CACHE BOOL "Build the NCurses components")
set(GUI ON CACHE BOOL "Build GUI components (AlethZero, Mix)")
set(TESTS ON CACHE BOOL "Build the tests.")
set(EVMJIT OFF CACHE BOOL "Build just-in-time compiler for EVM code (requires LLVM)")
@ -146,6 +141,12 @@ set (ETH_HAVE_WEBENGINE 1)
# Normalise build options
# TODO: Abstract into something sensible and move into a function.
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
set(DECENT_PLATFORM OFF)
else ()
set(DECENT_PLATFORM ON)
endif ()
if (PARANOIA)
set(PARANOIA ON)
else ()
@ -224,31 +225,35 @@ if (BUNDLE STREQUAL "minimal")
set(SOLIDITY OFF)
set(USENPM OFF)
set(GUI OFF)
set(TESTS OFF)
set(NCURSES OFF)
set(TOOLS ON)
set(TESTS OFF)
elseif (BUNDLE STREQUAL "full")
set(SERPENT ON)
set(SOLIDITY ON)
set(USENPM ON)
set(GUI ON)
set(TESTS ON)
set(NCURSES ${DECENT_PLATFORM})
set(TOOLS ON)
set(TESTS ON)
set(FATDB ON)
elseif (BUNDLE STREQUAL "tests")
set(SERPENT ON)
set(SOLIDITY ON)
set(USENPM OFF)
set(GUI OFF)
set(TESTS ON)
set(NCURSES OFF)
set(TOOLS OFF)
set(TESTS ON)
set(FATDB ON)
elseif (BUNDLE STREQUAL "user")
set(SERPENT OFF)
set(SOLIDITY OFF)
set(USENPM OFF)
set(GUI ON)
set(TESTS OFF)
set(NCURSES ${DECENT_PLATFORM})
set(TOOLS ON)
set(TESTS OFF)
endif ()
# Default CMAKE_BUILD_TYPE to "Release".
@ -263,28 +268,29 @@ if ("x${TARGET_PLATFORM}" STREQUAL "x")
set(TARGET_PLATFORM "linux")
endif ()
message("------------------------------------------------------------------------")
message("-- CMake Version ${CMAKE_VERSION}")
message("-- Build type CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}")
message("-- Target platform TARGET_PLATFORM ${TARGET_PLATFORM}")
message("-- Build bundle BUNDLE ${BUNDLE}")
message("------------------------------------------------------------------------ features")
message("-- Chromium support [auto-detected] ${ETH_HAVE_WEBENGINE}")
message("-- VM execution tracing VMTRACE ${VMTRACE}")
message("-- Profiling support PROFILING ${PROFILING}")
message("-- Additional (SLOW) database checking PARANOIA ${PARANOIA}")
message("-- Full database exploring FATDB ${FATDB}")
message("-- JSON-RPC support JSONRPC ${JSONRPC}")
message("-- Javascript source building USENPM ${USENPM}")
message("------------------------------------------------------------------------ components")
message("-- Build GUI components GUI ${GUI}")
message("-- Build NCurses components NCURSES ${NCURSES}")
message("-- Build tests TESTS ${TESTS}")
message("-- Build Solidity language components SOLIDITY ${SOLIDITY}")
message("-- Build Serpent language components SERPENT ${SERPENT}")
message("-- Build OpenCL components (experimental!) ETHASHCL ${ETHASHCL}")
message("-- Build LLVM-based JIT EVM (experimental!) EVMJIT ${EVMJIT}")
message("------------------------------------------------------------------------")
message("-----------------------------------------------------------------------------")
message("-- CMake Version ${CMAKE_VERSION}")
message("-- CMAKE_BUILD_TYPE Build type ${CMAKE_BUILD_TYPE}")
message("-- TARGET_PLATFORM Target platform ${TARGET_PLATFORM}")
message("-- BUNDLE Build bundle ${BUNDLE}")
message("-------------------------------------------------------------------- features")
message("-- Chromium support ${ETH_HAVE_WEBENGINE}")
message("-- VMTRACE VM execution tracing ${VMTRACE}")
message("-- PROFILING Profiling support ${PROFILING}")
message("-- PARANOIA Additional (SLOW) database checking ${PARANOIA}")
message("-- FATDB Full database exploring ${FATDB}")
message("-- JSONRPC JSON-RPC support ${JSONRPC}")
message("-- USENPM Javascript source building ${USENPM}")
message("------------------------------------------------------------------ components")
message("-- TOOLS Build basic tools ${TOOLS}")
message("-- SOLIDITY Build Solidity language components ${SOLIDITY}")
message("-- SERPENT Build Serpent language components ${SERPENT}")
message("-- GUI Build GUI components ${GUI}")
message("-- NCURSES Build NCurses components ${NCURSES}")
message("-- TESTS Build tests ${TESTS}")
message("-- ETHASHCL Build OpenCL components (experimental!) ${ETHASHCL}")
message("-- EVMJIT Build LLVM-based JIT EVM (experimental!) ${EVMJIT}")
message("-----------------------------------------------------------------------------")
message("")

Loading…
Cancel
Save