From 4d763dadabc380a0407ae441dc14420e4cf9033d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 28 Mar 2018 15:19:41 +0200 Subject: [PATCH 1/2] Add main CMake script --- .gitignore | 3 +++ CMakeLists.txt | 11 +++++++++++ examples/CMakeLists.txt | 5 ++--- 3 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 .gitignore create mode 100644 CMakeLists.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..861d89a --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/build +/cmake-build-* +/.idea diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..cf1f124 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.5) + +project(evmc) + +add_library(evmc INTERFACE) +target_include_directories(evmc INTERFACE include) + +option(EVMC_BUILD_EXAMPLES "Build EVMC examples" ON) +if(EVMC_BUILD_EXAMPLES) + add_subdirectory(examples) +endif() diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index dea2a0f..79d39bf 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -1,8 +1,7 @@ add_library(example-vm STATIC examplevm.c) -target_include_directories(example-vm PRIVATE ../include) +target_link_libraries(example-vm PRIVATE evmc) target_compile_options(example-vm PRIVATE -Wno-extra) add_executable(example-capi capi.c) -target_include_directories(example-capi PRIVATE ../include) -target_link_libraries(example-capi PRIVATE example-vm) +target_link_libraries(example-capi PRIVATE evmc example-vm) target_compile_options(example-capi PRIVATE -Wno-extra) From a0d4cb50f69f25d80e9b5158d45d1d2f9ec1be5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Wed, 28 Mar 2018 15:20:39 +0200 Subject: [PATCH 2/2] Add Circle CI config --- circle.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 circle.yml diff --git a/circle.yml b/circle.yml new file mode 100644 index 0000000..e48452d --- /dev/null +++ b/circle.yml @@ -0,0 +1,21 @@ +version: 2 +jobs: + + build: + docker: + - image: ethereum/cpp-build-env + steps: + - checkout + - run: + name: "Configure" + working_directory: ~/build + command: cmake ../project + - run: + name: "Build" + command: cmake --build ~/build + +workflows: + version: 2 + evmc: + jobs: + - build