From 0f503f1577db9ec48c70402ac82b94d664fac7a1 Mon Sep 17 00:00:00 2001 From: sveneh Date: Tue, 2 Dec 2014 19:01:24 +0100 Subject: [PATCH 1/2] converted whitespaces to tabs according to style guide; handling if json-rpc-cpp is not available --- CMakeLists.txt | 2 +- cmake/EthDependencies.cmake | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 73dc83d80..3b10caa60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -139,7 +139,7 @@ if (NOT LANGUAGES) add_subdirectory(exp) endif () if(NOT ("${TARGET_PLATFORM}" STREQUAL "w64")) - add_subdirectory(neth) + add_subdirectory(neth) endif () if(QTQML) add_definitions(-DETH_QTQML) diff --git a/cmake/EthDependencies.cmake b/cmake/EthDependencies.cmake index 04e57cce7..776657bd3 100644 --- a/cmake/EthDependencies.cmake +++ b/cmake/EthDependencies.cmake @@ -19,9 +19,10 @@ message(" - Jsoncpp header: ${JSONCPP_INCLUDE_DIRS}") message(" - Jsoncpp lib : ${JSONCPP_LIBRARIES}") # TODO the JsonRpcCpp package does not yet check for correct version number -find_package (JsonRpcCpp 0.3.2 REQUIRED) +# json-rpc-cpp support is currently not mandatory +find_package (JsonRpcCpp 0.3.2) if (${JSON_RPC_CPP_FOUND}) - message (" - json-rpc-cpp header: ${JSON_RPC_CPP_INCLUDE_DIRS}") - message (" - json-rpc-cpp lib : ${JSON_RPC_CPP_LIBRARIES}") + message (" - json-rpc-cpp header: ${JSON_RPC_CPP_INCLUDE_DIRS}") + message (" - json-rpc-cpp lib : ${JSON_RPC_CPP_LIBRARIES}") add_definitions(-DETH_JSONRPC) endif() From d134a9b4e3b1911a97930a47dfd0b6186ed58d35 Mon Sep 17 00:00:00 2001 From: sveneh Date: Wed, 3 Dec 2014 10:40:55 +0100 Subject: [PATCH 2/2] inital script for CI building. Currently only builds dependencies --- build.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100755 build.py diff --git a/build.py b/build.py new file mode 100755 index 000000000..099a8721d --- /dev/null +++ b/build.py @@ -0,0 +1,27 @@ +#!/usr/bin/python +# cpp-ethereum build script +# to be used from CI server, or to build locally +# uses python instead of bash script for better cross-platform support + +# TODO Initial version. Needs much more improvements + +import argparse +import os +import subprocess + +def build_dependencies(): + if os.path.exists("extdep"): + os.chdir("extdep") + if not os.path.exists("build"): + os.makedirs("build") + os.chdir("build") + subprocess.check_call(["cmake", ".."]) + subprocess.check_call("make") + +parser = argparse.ArgumentParser() +parser.add_argument("cmd", help="what to build") + +args = parser.parse_args() +if args.cmd == "dep": + build_dependencies() +