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
# Normally, set(...CACHE...) creates cache variables, but does not modify them.
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(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")
@ -21,7 +26,8 @@ function(createDefaultCacheConfig)
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 (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(ETHASHCL OFF CACHE BOOL "Build in support for GPU mining via OpenCL")
set(PROFILING OFF CACHE BOOL "Build in support for profiling")
@ -140,72 +146,82 @@ set (ETH_HAVE_WEBENGINE 1)
if (PARANOIA)
set(PARANOIA ON)
else ()
set (PARANOIA OFF)
set(PARANOIA OFF)
endif ()
if (VMTRACE)
set(VMTRACE ON)
else ()
set (VMTRACE OFF)
set(VMTRACE OFF)
endif ()
if (ETHASHCL)
set(ETHASHCL ON)
else ()
set (ETHASHCL OFF)
set(ETHASHCL OFF)
endif()
if (EVMJIT)
set(EVMJIT ON)
else ()
set (EVMJIT OFF)
set(EVMJIT OFF)
endif()
if (FATDB)
set(FATDB ON)
else ()
set (FATDB OFF)
set(FATDB OFF)
endif()
if (SOLIDITY)
set(SOLIDITY ON)
else ()
set (SOLIDITY OFF)
set(SOLIDITY OFF)
endif()
if (SERPENT)
set(SERPENT ON)
else ()
set(SERPENT OFF)
endif()
if (HEADLESS)
set(HEADLESS ON)
else ()
set (HEADLESS OFF)
set(HEADLESS OFF)
endif ()
if (JUSTTESTS)
set(JUSTTESTS ON)
else ()
set (JUSTTESTS OFF)
set(JUSTTESTS OFF)
endif ()
if (JSONRPC)
set(JSONRPC ON)
else ()
set (JSONRPC OFF)
set(JSONRPC OFF)
endif ()
if (USENPM)
set(USENPM ON)
else ()
set (USENPM OFF)
set(USENPM OFF)
endif ()
if (PROFILING)
set(PROFILING ON)
else ()
set (PROFILING OFF)
set(PROFILING OFF)
endif ()
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif ()
message(STATUS "CMake Version: ${CMAKE_VERSION}")
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("-- Build Solidity language components SOLIDITY ${SOLIDITY}")
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 type CMAKE_BUILD_TYPE ${CMAKE_BUILD_TYPE}")
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("-- Build Solidity language components SOLIDITY ${SOLIDITY}")
message("-- Build Serpent language components SERPENT ${SERPENT}")
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("------------------------------------------------------------------------")
message("")
@ -239,7 +255,7 @@ add_subdirectory(libdevcore)
add_subdirectory(libevmcore)
add_subdirectory(liblll)
if (NOT ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC"))
if (SERPENT)
add_subdirectory(libserpent)
add_subdirectory(sc)
endif ()

2
cmake/EthCompilerSettings.cmake

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

Loading…
Cancel
Save