From 49e02b5a997b2c8253372ea8a866b59b989fc5fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 23 Jul 2015 08:41:27 +0200 Subject: [PATCH 1/3] Build EVM JIT by default. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d92ee90a..5b9187d79 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ option(TOOLS "Build the tools components" ON) option(GUI "Build GUI components (AlethZero, Mix)" ON) option(TESTS "Build the tests." ON) option(NOBOOST "No use of boost macros in test functions" OFF) -option(EVMJIT "Build just-in-time compiler for EVM code (requires LLVM)" OFF) +option(EVMJIT "Build just-in-time compiler for EVM code (requires LLVM)" ON) option(ETHASHCL "Build in support for GPU mining via OpenCL" ON) option(JSCONSOLE "Build in javascript console" ON) From 2728436eb7660fc4568cffa3b15dc354f5516bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 23 Jul 2015 09:00:57 +0200 Subject: [PATCH 2/3] Set default value of LLVM_DIR on OSX --- CMakeLists.txt | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b9187d79..601a05ed3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -355,9 +355,14 @@ else() endif() if (EVMJIT) - if (CMAKE_SYSTEM_NAME STREQUAL "Windows" AND NOT DEFINED LLVM_DIR) - set(LLVM_DIR "${CMAKE_SOURCE_DIR}/extdep/install/windows/x64/share/llvm/cmake") + if (NOT DEFINED LLVM_DIR) + if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + set(LLVM_DIR "${CMAKE_SOURCE_DIR}/extdep/install/windows/x64/share/llvm/cmake") + elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(LLVM_DIR "/usr/local/opt/llvm/share/llvm/cmake") + endif() endif() + set(EVMJIT_CPP TRUE) # include CPP-JIT connector add_subdirectory(evmjit) if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") From 6d10e19fb126dc30929672f1c2af65eddb8faa33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 28 Jul 2015 12:03:47 +0200 Subject: [PATCH 3/3] Place project version in cmake variable PROJECT_VERSION. --- BuildInfo.h.in | 4 ++-- CMakeLists.txt | 11 +++++++++-- libdevcore/Common.cpp | 4 ++-- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/BuildInfo.h.in b/BuildInfo.h.in index 7d2bfc1c8..5e97b71a5 100644 --- a/BuildInfo.h.in +++ b/BuildInfo.h.in @@ -1,7 +1,7 @@ #pragma once +#define ETH_PROJECT_VERSION "@PROJECT_VERSION@" #define ETH_COMMIT_HASH @ETH_COMMIT_HASH@ #define ETH_CLEAN_REPO @ETH_CLEAN_REPO@ #define ETH_BUILD_TYPE @ETH_BUILD_TYPE@ -#define ETH_BUILD_PLATFORM @ETH_BUILD_PLATFORM@ - +#define ETH_BUILD_PLATFORM @ETH_BUILD_PLATFORM@ diff --git a/CMakeLists.txt b/CMakeLists.txt index edf57debe..bbdda0a77 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,13 @@ # cmake global cmake_minimum_required(VERSION 2.8.12) -project(ethereum) +set(PROJECT_VERSION "0.9.34") +if (${CMAKE_VERSION} VERSION_GREATER 3.0) + cmake_policy(SET CMP0048 NEW) # allow VERSION argument in project() + project(ethereum VERSION ${PROJECT_VERSION}) +else() + project(ethereum) +endif() set(CMAKE_AUTOMOC ON) @@ -136,6 +142,7 @@ function(createBuildInfo) WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} COMMAND ${CMAKE_COMMAND} -DETH_SOURCE_DIR="${CMAKE_SOURCE_DIR}" -DETH_DST_DIR="${CMAKE_BINARY_DIR}" -DETH_BUILD_TYPE="${_cmake_build_type}" -DETH_BUILD_PLATFORM="${ETH_BUILD_PLATFORM}" + -DPROJECT_VERSION="${PROJECT_VERSION}" -P "${ETH_SCRIPTS_DIR}/buildinfo.cmake" ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) @@ -539,7 +546,7 @@ if (WIN32) set(CPACK_PACKAGE_VENDOR "ethereum.org") set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") - set(CPACK_PACKAGE_VERSION "0.9.34") + set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) set(CPACK_GENERATOR "NSIS") # seems to be not working # set(CPACK_PACKAGE_ICON "${CMAKE_CURRENT_SOURCE_DIR}/alethzero/alethzero.bmp") diff --git a/libdevcore/Common.cpp b/libdevcore/Common.cpp index d97b44445..6fd97a781 100644 --- a/libdevcore/Common.cpp +++ b/libdevcore/Common.cpp @@ -22,13 +22,14 @@ #include "Common.h" #include "Exceptions.h" #include "Log.h" +#include "BuildInfo.h" using namespace std; using namespace dev; namespace dev { -char const* Version = "0.9.34"; +char const* Version = ETH_PROJECT_VERSION; const u256 UndefinedU256 = ~(u256)0; @@ -57,4 +58,3 @@ TimerHelper::~TimerHelper() } } -