Browse Source

Ability to disable serpent building.

cl-refactor
Gav Wood 10 years ago
parent
commit
8111a3e6b3
  1. 66
      CMakeLists.txt
  2. 2
      cmake/EthCompilerSettings.cmake

66
CMakeLists.txt

@ -14,6 +14,11 @@ 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(SERPENT_DEFAULT OFF)
else ()
set(SERPENT_DEFAULT ON)
endif ()
set(HEADLESS OFF CACHE BOOL "Do not compile GUI (AlethZero)") 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(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")
@ -21,7 +26,8 @@ function(createDefaultCacheConfig)
set(EVMJIT OFF CACHE BOOL "Build a just-in-time compiler for EVM code (requires LLVM)") 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(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(JUSTTESTS OFF CACHE BOOL "Build only for tests.")
set(SOLIDITY ON CACHE BOOL "Build the Solidity language components (requried unless HEADLESS)") 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(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(ETHASHCL OFF CACHE BOOL "Build in support for GPU mining via OpenCL") set(ETHASHCL OFF CACHE BOOL "Build in support for GPU mining via OpenCL")
set(PROFILING OFF CACHE BOOL "Build in support for profiling") set(PROFILING OFF CACHE BOOL "Build in support for profiling")
@ -140,72 +146,82 @@ set (ETH_HAVE_WEBENGINE 1)
if (PARANOIA) if (PARANOIA)
set(PARANOIA ON) set(PARANOIA ON)
else () else ()
set (PARANOIA OFF) set(PARANOIA OFF)
endif () endif ()
if (VMTRACE) if (VMTRACE)
set(VMTRACE ON) set(VMTRACE ON)
else () else ()
set (VMTRACE OFF) set(VMTRACE OFF)
endif () endif ()
if (ETHASHCL) if (ETHASHCL)
set(ETHASHCL ON) set(ETHASHCL ON)
else () else ()
set (ETHASHCL OFF) set(ETHASHCL OFF)
endif() endif()
if (EVMJIT) if (EVMJIT)
set(EVMJIT ON) set(EVMJIT ON)
else () else ()
set (EVMJIT OFF) set(EVMJIT OFF)
endif() endif()
if (FATDB) if (FATDB)
set(FATDB ON) set(FATDB ON)
else () else ()
set (FATDB OFF) set(FATDB OFF)
endif() endif()
if (SOLIDITY) if (SOLIDITY)
set(SOLIDITY ON) set(SOLIDITY ON)
else () else ()
set (SOLIDITY OFF) set(SOLIDITY OFF)
endif()
if (SERPENT)
set(SERPENT ON)
else ()
set(SERPENT OFF)
endif() endif()
if (HEADLESS) if (HEADLESS)
set(HEADLESS ON) set(HEADLESS ON)
else () else ()
set (HEADLESS OFF) set(HEADLESS OFF)
endif () endif ()
if (JUSTTESTS) if (JUSTTESTS)
set(JUSTTESTS ON) set(JUSTTESTS ON)
else () else ()
set (JUSTTESTS OFF) set(JUSTTESTS OFF)
endif () endif ()
if (JSONRPC) if (JSONRPC)
set(JSONRPC ON) set(JSONRPC ON)
else () else ()
set (JSONRPC OFF) set(JSONRPC OFF)
endif () endif ()
if (USENPM) if (USENPM)
set(USENPM ON) set(USENPM ON)
else () else ()
set (USENPM OFF) set(USENPM OFF)
endif () endif ()
if (PROFILING) if (PROFILING)
set(PROFILING ON) set(PROFILING ON)
else () else ()
set (PROFILING OFF) set(PROFILING OFF)
endif ()
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif () endif ()
message(STATUS "CMake Version: ${CMAKE_VERSION}") message(STATUS "CMake Version: ${CMAKE_VERSION}")
message("-- VM execution tracing VMTRACE ${VMTRACE}") message("-- Build type CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}")
message("-- Profiling support PROFILING ${PROFILING}") message("-- VM execution tracing VMTRACE ${VMTRACE}")
message("-- Additional (SLOW) database checking PARANOIA ${PARANOIA}") message("-- Profiling support PROFILING ${PROFILING}")
message("-- Full database exploring FATDB ${FATDB}") message("-- Additional (SLOW) database checking PARANOIA ${PARANOIA}")
message("-- Build Javascript components from source USENPM ${USENPM}") message("-- Full database exploring FATDB ${FATDB}")
message("-- Build only headless components HEADLESS ${HEADLESS}") message("-- Build Javascript components from source USENPM ${USENPM}")
message("-- Build only tests JUSTTESTS ${JUSTTESTS}") message("-- Build only headless components HEADLESS ${HEADLESS}")
message("-- Build Solidity language components SOLIDITY ${SOLIDITY}") message("-- Build only tests JUSTTESTS ${JUSTTESTS}")
message("-- Build OpenCL components ETHASHCL ${ETHASHCL}") message("-- Build Solidity language components SOLIDITY ${SOLIDITY}")
message("-- Build LLVM-based JIT EVM EVMJIT ${EVMJIT}") message("-- Build Serpent language components SERPENT ${SERPENT}")
message("-- Build with support for JSON-RPC JSONRPC ${JSONRPC}") message("-- Build OpenCL components ETHASHCL ${ETHASHCL}")
message("-- Build with support for Chromium ${ETH_HAVE_WEBENGINE}") 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("------------------------------------------------------------------------") message("------------------------------------------------------------------------")
message("") message("")
@ -239,7 +255,7 @@ add_subdirectory(libdevcore)
add_subdirectory(libevmcore) add_subdirectory(libevmcore)
add_subdirectory(liblll) add_subdirectory(liblll)
if (NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")) if (SERPENT)
add_subdirectory(libserpent) add_subdirectory(libserpent)
add_subdirectory(sc) add_subdirectory(sc)
endif () endif ()

2
cmake/EthCompilerSettings.cmake

@ -11,7 +11,7 @@ if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
set(ETH_SHARED 1) set(ETH_SHARED 1)
if (PROFILING) if (PROFILING)
set(CMAKE_CXX_FLAGS "-pg ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "-pg -g ${CMAKE_CXX_FLAGS}")
endif () endif ()
execute_process( execute_process(

Loading…
Cancel
Save