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 # user defined, defaults
# Normally, set(...CACHE...) creates cache variables, but does not modify them. # Normally, set(...CACHE...) creates cache variables, but does not modify them.
function(createDefaultCacheConfig) 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(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(PARANOIA OFF CACHE BOOL "Additional run-time checks")
set(JSONRPC ON CACHE BOOL "Build with jsonprc. default on") 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(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(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(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(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(GUI ON CACHE BOOL "Build GUI components (AlethZero, Mix)")
set(TESTS ON CACHE BOOL "Build the tests.") set(TESTS ON CACHE BOOL "Build the tests.")
set(EVMJIT OFF CACHE BOOL "Build just-in-time compiler for EVM code (requires LLVM)") 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 # Normalise build options
# TODO: Abstract into something sensible and move into a function. # 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) if (PARANOIA)
set(PARANOIA ON) set(PARANOIA ON)
else () else ()
@ -224,31 +225,35 @@ if (BUNDLE STREQUAL "minimal")
set(SOLIDITY OFF) set(SOLIDITY OFF)
set(USENPM OFF) set(USENPM OFF)
set(GUI OFF) set(GUI OFF)
set(TESTS OFF) set(NCURSES OFF)
set(TOOLS ON) set(TOOLS ON)
set(TESTS OFF)
elseif (BUNDLE STREQUAL "full") elseif (BUNDLE STREQUAL "full")
set(SERPENT ON) set(SERPENT ON)
set(SOLIDITY ON) set(SOLIDITY ON)
set(USENPM ON) set(USENPM ON)
set(GUI ON) set(GUI ON)
set(TESTS ON) set(NCURSES ${DECENT_PLATFORM})
set(TOOLS ON) set(TOOLS ON)
set(TESTS ON)
set(FATDB ON) set(FATDB ON)
elseif (BUNDLE STREQUAL "tests") elseif (BUNDLE STREQUAL "tests")
set(SERPENT ON) set(SERPENT ON)
set(SOLIDITY ON) set(SOLIDITY ON)
set(USENPM OFF) set(USENPM OFF)
set(GUI OFF) set(GUI OFF)
set(TESTS ON) set(NCURSES OFF)
set(TOOLS OFF) set(TOOLS OFF)
set(TESTS ON)
set(FATDB ON) set(FATDB ON)
elseif (BUNDLE STREQUAL "user") elseif (BUNDLE STREQUAL "user")
set(SERPENT OFF) set(SERPENT OFF)
set(SOLIDITY OFF) set(SOLIDITY OFF)
set(USENPM OFF) set(USENPM OFF)
set(GUI ON) set(GUI ON)
set(TESTS OFF) set(NCURSES ${DECENT_PLATFORM})
set(TOOLS ON) set(TOOLS ON)
set(TESTS OFF)
endif () endif ()
# Default CMAKE_BUILD_TYPE to "Release". # Default CMAKE_BUILD_TYPE to "Release".
@ -263,28 +268,29 @@ if ("x${TARGET_PLATFORM}" STREQUAL "x")
set(TARGET_PLATFORM "linux") set(TARGET_PLATFORM "linux")
endif () endif ()
message("------------------------------------------------------------------------") message("-----------------------------------------------------------------------------")
message("-- CMake Version ${CMAKE_VERSION}") message("-- CMake Version ${CMAKE_VERSION}")
message("-- Build type CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}") message("-- CMAKE_BUILD_TYPE Build type ${CMAKE_BUILD_TYPE}")
message("-- Target platform TARGET_PLATFORM ${TARGET_PLATFORM}") message("-- TARGET_PLATFORM Target platform ${TARGET_PLATFORM}")
message("-- Build bundle BUNDLE ${BUNDLE}") message("-- BUNDLE Build bundle ${BUNDLE}")
message("------------------------------------------------------------------------ features") message("-------------------------------------------------------------------- features")
message("-- Chromium support [auto-detected] ${ETH_HAVE_WEBENGINE}") message("-- Chromium support ${ETH_HAVE_WEBENGINE}")
message("-- VM execution tracing VMTRACE ${VMTRACE}") message("-- VMTRACE VM execution tracing ${VMTRACE}")
message("-- Profiling support PROFILING ${PROFILING}") message("-- PROFILING Profiling support ${PROFILING}")
message("-- Additional (SLOW) database checking PARANOIA ${PARANOIA}") message("-- PARANOIA Additional (SLOW) database checking ${PARANOIA}")
message("-- Full database exploring FATDB ${FATDB}") message("-- FATDB Full database exploring ${FATDB}")
message("-- JSON-RPC support JSONRPC ${JSONRPC}") message("-- JSONRPC JSON-RPC support ${JSONRPC}")
message("-- Javascript source building USENPM ${USENPM}") message("-- USENPM Javascript source building ${USENPM}")
message("------------------------------------------------------------------------ components") message("------------------------------------------------------------------ components")
message("-- Build GUI components GUI ${GUI}") message("-- TOOLS Build basic tools ${TOOLS}")
message("-- Build NCurses components NCURSES ${NCURSES}") message("-- SOLIDITY Build Solidity language components ${SOLIDITY}")
message("-- Build tests TESTS ${TESTS}") message("-- SERPENT Build Serpent language components ${SERPENT}")
message("-- Build Solidity language components SOLIDITY ${SOLIDITY}") message("-- GUI Build GUI components ${GUI}")
message("-- Build Serpent language components SERPENT ${SERPENT}") message("-- NCURSES Build NCurses components ${NCURSES}")
message("-- Build OpenCL components (experimental!) ETHASHCL ${ETHASHCL}") message("-- TESTS Build tests ${TESTS}")
message("-- Build LLVM-based JIT EVM (experimental!) EVMJIT ${EVMJIT}") message("-- ETHASHCL Build OpenCL components (experimental!) ${ETHASHCL}")
message("------------------------------------------------------------------------") message("-- EVMJIT Build LLVM-based JIT EVM (experimental!) ${EVMJIT}")
message("-----------------------------------------------------------------------------")
message("") message("")

Loading…
Cancel
Save