@ -8,30 +8,26 @@ project(ethereum)
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" )
list ( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake" )
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# u s e r d e f i n e d , d e f a u l t s
# u s e r d e f i n e d , d e f a u l t s
# 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 .
# 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 )
option ( VMTRACE "VM tracing and run-time checks (useful for cross-implementation VM debugging)" OFF )
set ( VMTRACE OFF CACHE BOOL "VM tracing and run-time checks (useful for cross-implementation VM debugging)" )
option ( PARANOID "Additional run-time checks" OFF )
set ( PARANOID OFF CACHE BOOL "Additional run-time checks" )
option ( JSONRPC "Build with jsonprc. default on" ON )
set ( JSONRPC ON CACHE BOOL "Build with jsonprc. default on" )
option ( FATDB "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." OFF )
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." )
option ( USENPM "Use npm to recompile ethereum.js if it was changed" OFF )
set ( USENPM OFF CACHE BOOL "Use npm to recompile ethereum.js if it was changed" )
option ( PROFILING "Build in support for profiling" OFF )
set ( PROFILING OFF CACHE BOOL "Build in support for profiling" )
set ( BUNDLE "none" CACHE STRING "Predefined bundle of software to build (none, full, user, tests, minimal)." )
set ( BUNDLE "none" CACHE STRING "Predefined bundle of software to build (none, full, user, tests, minimal)." )
option ( SOLIDITY "Build the Solidity language components" ON )
set ( SOLIDITY ON CACHE BOOL "Build the Solidity language components" )
option ( SERPENT "Build the Serpent language components" ON )
set ( SERPENT ON CACHE BOOL "Build the Serpent language components" )
option ( TOOLS "Build the tools components" ON )
set ( TOOLS ON CACHE BOOL "Build the tools components" )
option ( NCURSES "Build the NCurses components" ON )
set ( NCURSES ON CACHE BOOL "Build the NCurses components" )
option ( GUI "Build GUI components (AlethZero, Mix)" ON )
set ( GUI ON CACHE BOOL "Build GUI components (AlethZero, Mix)" )
option ( TESTS "Build the tests." ON )
set ( TESTS ON CACHE BOOL "Build the tests." )
option ( EVMJIT "Build just-in-time compiler for EVM code (requires LLVM)" OFF )
set ( EVMJIT OFF CACHE BOOL "Build just-in-time compiler for EVM code (requires LLVM)" )
option ( ETHASHCL "Build in support for GPU mining via OpenCL" OFF )
set ( ETHASHCL OFF CACHE BOOL "Build in support for GPU mining via OpenCL" )
endfunction ( )
# p r o p a g a t e s C M a k e c o n f i g u r a t i o n o p t i o n s t o t h e c o m p i l e r
# p r o p a g a t e s C M a k e c o n f i g u r a t i o n o p t i o n s t o t h e c o m p i l e r
function ( configureProject )
function ( configureProject )
@ -143,97 +139,57 @@ if ("${CMAKE_BUILD_TYPE}" STREQUAL "Release")
endif ( )
endif ( )
endif ( )
endif ( )
createDefaultCacheConfig ( )
# F o r c e c h r o m i u m .
# F o r c e c h r o m i u m .
set ( ETH_HAVE_WEBENGINE 1 )
set ( ETH_HAVE_WEBENGINE 1 )
# N o r m a l i s e b u i l d o p t i o n s
# T O D O : A b s t r a c t i n t o s o m e t h i n g s e n s i b l e a n d m o v e i n t o a f u n c t i o n .
if ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" )
set ( DECENT_PLATFORM OFF )
else ( )
set ( DECENT_PLATFORM ON )
endif ( )
# B a c k w a r d s c o m p a t i b i l i t y
# B a c k w a r d s c o m p a t i b i l i t y
if ( HEADLESS )
if ( HEADLESS )
message ( "*** WARNING: -DHEADLESS=1 option is DEPRECATED! Use -DBUNDLE=minimal or -DGUI=0" )
message ( "*** WARNING: -DHEADLESS=1 option is DEPRECATED! Use -DBUNDLE=minimal or -DGUI=0" )
set ( BUNDLE "minimal" )
set ( BUNDLE "minimal" )
endif ( )
endif ( )
if ( PARANOID )
# T O D O : A b s t r a c t i n t o s o m e t h i n g s e n s i b l e a n d m o v e i n t o a f u n c t i o n .
set ( PARANOID ON )
if ( "${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" )
else ( )
set ( DECENT_PLATFORM OFF )
set ( PARANOID OFF )
endif ( )
if ( VMTRACE )
set ( VMTRACE ON )
else ( )
set ( VMTRACE OFF )
endif ( )
if ( EVMJIT )
set ( EVMJIT ON )
else ( )
set ( EVMJIT OFF )
endif ( )
if ( FATDB )
set ( FATDB ON )
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 ( )
else ( )
set ( PROFILING OFF )
set ( DECENT_PLATFORM ON )
endif ( )
endif ( )
macro ( eth_format_option O )
if ( ${ ${O } } )
set ( ${ O } ON )
else ( )
set ( ${ O } OFF )
endif ( )
endmacro ( )
macro ( eth_format_option_on_decent_platform O )
if ( ${ ${O } } )
set ( ${ O } ${ DECENT_PLATFORM } )
else ( )
set ( ${ O } OFF )
endif ( )
endmacro ( )
# N o r m a l i s e b u i l d o p t i o n s
eth_format_option ( PARANOID )
eth_format_option ( VMTRACE )
eth_format_option ( EVMJIT )
eth_format_option ( FATDB )
eth_format_option ( JSONRPC )
eth_format_option ( USENPM )
eth_format_option ( PROFILING )
eth_format_option ( SOLIDITY )
eth_format_option ( GUI )
eth_format_option ( TESTS )
eth_format_option ( TOOLS )
eth_format_option ( ETHASHCL )
eth_format_option_on_decent_platform ( SERPENT )
eth_format_option_on_decent_platform ( NCURSES )
if ( SOLIDITY )
set ( SOLIDITY ON )
else ( )
set ( SOLIDITY OFF )
endif ( )
if ( SERPENT )
set ( SERPENT ${ DECENT_PLATFORM } )
else ( )
set ( SERPENT OFF )
endif ( )
if ( GUI )
if ( GUI )
set ( GUI ON )
set ( JSONRPC ON )
set ( JSONRPC ON )
else ( )
set ( GUI OFF )
endif ( )
if ( TESTS )
set ( TESTS ON )
else ( )
set ( TESTS OFF )
endif ( )
if ( TOOLS )
set ( TOOLS ON )
else ( )
set ( TOOLS OFF )
endif ( )
if ( ETHASHCL )
set ( ETHASHCL ON )
else ( )
set ( ETHASHCL OFF )
endif ( )
endif ( )
if ( NCURSES )
set ( NCURSES ${ DECENT_PLATFORM } )
else ( )
set ( NCURSES OFF )
endif ( )
if ( BUNDLE STREQUAL "minimal" )
if ( BUNDLE STREQUAL "minimal" )
set ( SERPENT OFF )
set ( SERPENT OFF )