@ -15,23 +15,26 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# N o r m a l l y , set ( ...CACHE... ) c r e a t e s c a c h e v a r i a b l e s , b u t d o e s n o t m o d i f y t h e m .
function ( createDefaultCacheConfig )
if ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" )
set ( SERPENT_DEFAULT OFF )
set ( DECENT_PLATFORM OFF )
else ( )
set ( SERPENT_DEFAULT ON )
set ( DECENT_PLATFORM ON )
endif ( )
set ( HEADLESS OFF CACHE BOOL "Do not compile GUI (AlethZero)" )
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" )
set ( EVMJIT OFF CACHE BOOL "Build a just-in-time compiler for EVM code (requires LLVM)" )
set ( FATDB OFF CACHE BOOL "Build with ability to list entries in the Trie. Doubles DB size, slows everything down, but good for looking at state diffs and trie contents." )
set ( JUSTTESTS OFF CACHE BOOL "Build only for tests." )
set ( SOLIDITY ON CACHE BOOL "Build the Solidity language components (required unless HEADLESS)" )
set ( SERPENT ${ SERPENT_DEFAULT } CACHE BOOL "Build the Serpent language components (required unless HEADLESS)" )
set ( SDK ON CACHE BOOL "Build the SDK components" )
set ( USENPM OFF CACHE BOOL "Use npm to recompile ethereum.js if it was changed" )
set ( ETHASHCL OFF CACHE BOOL "Build in support for GPU mining via OpenCL" )
set ( PROFILING OFF CACHE BOOL "Build in support for profiling" )
set ( BUNDLE "full" CACHE STRING "Predefined bundle of software to build." )
set ( SOLIDITY ON CACHE BOOL "Build the Solidity language components" )
set ( SERPENT ${ DECENT_PLATFORM } 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 ( 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)" )
set ( ETHASHCL OFF CACHE BOOL "Build in support for GPU mining via OpenCL" )
endfunction ( )
@ -61,8 +64,8 @@ function(configureProject)
add_definitions ( -DETH_SOLIDITY )
endif ( )
if ( HEADLESS OR JUSTTESTS )
add_definitions ( -DETH_HEADLESS )
if ( GUI )
add_definitions ( -DETH_GUI )
endif ( )
endfunction ( )
@ -153,11 +156,6 @@ if (VMTRACE)
else ( )
set ( VMTRACE OFF )
endif ( )
if ( ETHASHCL )
set ( ETHASHCL ON )
else ( )
set ( ETHASHCL OFF )
endif ( )
if ( EVMJIT )
set ( EVMJIT ON )
else ( )
@ -168,6 +166,23 @@ if (FATDB)
else ( )
set ( FATDB OFF )
endif ( )
if ( JSONRPC )
set ( JSONRPC ON )
else ( )
set ( JSONRPC OFF )
endif ( )
if ( USENPM )
set ( USENPM ON )
else ( )
set ( USENPM OFF )
endif ( )
if ( PROFILING )
set ( PROFILING ON )
else ( )
set ( PROFILING OFF )
endif ( )
if ( SOLIDITY )
set ( SOLIDITY ON )
else ( )
@ -178,34 +193,66 @@ if (SERPENT)
else ( )
set ( SERPENT OFF )
endif ( )
if ( HEADLESS )
set ( HEADLESS ON )
if ( GUI )
set ( GUI ON )
else ( )
set ( HEADLESS OFF )
set ( GUI OFF )
endif ( )
if ( JUST TESTS)
set ( JUST TESTS ON )
if ( TESTS )
set ( TESTS ON )
else ( )
set ( JUST TESTS OFF )
set ( TESTS OFF )
endif ( )
if ( JSONRPC )
set ( JSONRPC ON )
if ( TOOLS )
set ( TOOLS ON )
else ( )
set ( JSONRPC OFF )
set ( TOOLS OFF )
endif ( )
if ( USENPM )
set ( USENPM ON )
if ( ETHASHCL )
set ( ETHASHCL ON )
else ( )
set ( USENPM OFF )
endif ( )
if ( PROFILING )
set ( PROFILING ON )
set ( ETHASHCL OFF )
endif ( )
if ( NCURSES )
set ( NCURSES ON )
else ( )
set ( PROFILING OFF )
set ( NCURSES OFF )
endif ( )
if ( BUNDLE STREQUAL "minimal" )
set ( SERPENT OFF )
set ( SOLIDITY OFF )
set ( USENPM OFF )
set ( GUI OFF )
set ( TESTS OFF )
set ( TOOLS ON )
elseif ( BUNDLE STREQUAL "full" )
set ( SERPENT ON )
set ( SOLIDITY ON )
set ( USENPM ON )
set ( GUI ON )
set ( TESTS ON )
set ( TOOLS ON )
set ( FATDB ON )
elseif ( BUNDLE STREQUAL "tests" )
set ( SERPENT ON )
set ( SOLIDITY ON )
set ( USENPM OFF )
set ( GUI OFF )
set ( TESTS ON )
set ( TOOLS OFF )
set ( FATDB ON )
elseif ( BUNDLE STREQUAL "user" )
set ( SERPENT OFF )
set ( SOLIDITY OFF )
set ( USENPM OFF )
set ( GUI ON )
set ( TESTS OFF )
set ( TOOLS ON )
endif ( )
# D e f a u l t C M A K E _ B U I L D _ T Y P E t o " R e l e a s e " .
set ( CMAKE_BUILD_TYPE CACHE STRING "Relase" )
set ( CMAKE_BUILD_TYPE CACHE STRING "Rele ase" )
if ( "x${CMAKE_BUILD_TYPE}" STREQUAL "x" )
set ( CMAKE_BUILD_TYPE "Release" )
endif ( )
@ -220,20 +267,23 @@ 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 ( "-- Build Javascript components from source USENPM ${USENPM}" )
message ( "-- Build only headless components HEADLESS ${HEADLESS}" )
message ( "-- Build only tests JUSTTESTS ${JUSTTESTS}" )
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 SDK components SDK ${SDK}" )
message ( "-- Build OpenCL components ETHASHCL ${ETHASHCL}" )
message ( "-- Build LLVM-based JIT EVM EVMJIT ${EVMJIT}" )
message ( "-- Build with support for JSON-RPC JSONRPC ${JSONRPC}" )
message ( "-- Build with support for Chromium ${ETH_HAVE_WEBENGINE}" )
message ( "-- Build OpenCL components (experimental!) ETHASHCL ${ETHASHCL}" )
message ( "-- Build LLVM-based JIT EVM (experimental!) EVMJIT ${EVMJIT}" )
message ( "------------------------------------------------------------------------" )
message ( "" )
@ -261,18 +311,16 @@ add_subdirectory(libdevcore)
add_subdirectory ( libevmcore )
add_subdirectory ( liblll )
if ( SDK )
if ( SERPENT )
add_subdirectory ( libserpent )
add_subdirectory ( sc )
endif ( )
if ( SERPENT )
add_subdirectory ( libserpent )
add_subdirectory ( sc )
endif ( )
if ( SOLIDITY )
add_subdirectory ( libsolidity )
endif ( )
if ( SOLIDITY )
add_subdirectory ( libsolidity )
endif ( )
if ( NOT JUSTTEST S)
if ( TOOL S)
add_subdirectory ( lllc )
if ( SOLIDITY )
add_subdirectory ( solc )
@ -297,12 +345,14 @@ endif ()
add_subdirectory ( libethcore )
add_subdirectory ( libevm )
add_subdirectory ( libethereum )
add_subdirectory ( libwebthree )
add_subdirectory ( libtestutils )
add_subdirectory ( test )
if ( NOT JUSTTESTS )
if ( TESTS )
add_subdirectory ( libtestutils )
add_subdirectory ( test )
endif ( )
if ( TOOLS )
add_subdirectory ( rlp )
add_subdirectory ( abi )
@ -312,27 +362,26 @@ if (NOT JUSTTESTS)
add_subdirectory ( exp )
endif ( )
# T O D O c h e c k m s v c
if ( NOT ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" ) )
add_subdirectory ( neth )
endif ( )
if ( NOT HEADLESS )
endif ( )
add_subdirectory ( libnatspec )
add_subdirectory ( libjsqrc )
if ( NCURSES )
add_subdirectory ( neth )
endif ( )
if ( ETH_HAVE_WEBENGINE )
add_subdirectory ( alethzero )
# add_subdirectory ( third ) / / r e e n a b l e o n c e n o t q t w e b k i t .
endif ( )
if ( GUI )
if ( SDK )
add_subdirectory ( mix )
endif ( )
add_subdirectory ( libnatspec )
add_subdirectory ( libjsqrc )
if ( ETH_HAVE_WEBENGINE )
add_subdirectory ( alethzero )
# add_subdirectory ( third ) / / r e e n a b l e o n c e n o t q t w e b k i t .
endif ( )
if ( SOLIDITY )
add_subdirectory ( mix )
endif ( )
endif ( )
# unset ( TARGET_PLATFORM CACHE )