openethereum/parity-clib/examples/cpp/CMakeLists.txt
TriplEight 6fcd775d48
CI improvements (#10579)
* check if it was the file

* collect tog files

* some debug

* some more debug

* some even more debug

* upload all the logs

* change cache max size

* test with max cache size overflow

* verbose for all cargo jobs

* lower max cache size

* Rust nightly and beta test runs reintroduced

* artifacts:when: always, coz on_success is default

* sccache full log

* normal artifacts name, big cache size

* add file to test the compilation again

* another way of getting artifacts

* per-job cache

* data race tests

* is it needed to clean the working folder?

* return to common cache dir

* do not pass logs between jobs

* typo

* avoid artifacts conflict

* colored logs

* always colored logs

* proper stages

* more proper stages skip-ci

* more proper stages [skip-ci]

* shouldn't skip ci
2019-04-12 18:51:01 +02:00

19 lines
694 B
CMake

cmake_minimum_required(VERSION 3.5)
include(ExternalProject)
include_directories("${CMAKE_SOURCE_DIR}/../..")
set (CMAKE_CXX_STANDARD 11) # Enforce C++11
add_executable(parity-example main.cpp)
ExternalProject_Add(
libparity
DOWNLOAD_COMMAND ""
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
COMMAND cargo build -p parity-clib --verbose --color=always # Note: use --release in a real project
BINARY_DIR "${CMAKE_SOURCE_DIR}/../../../target"
INSTALL_COMMAND ""
LOG_BUILD ON)
add_dependencies(parity-example libparity)
target_link_libraries(parity-example "${CMAKE_SOURCE_DIR}/../../../target/debug/${CMAKE_SHARED_LIBRARY_PREFIX}parity${CMAKE_SHARED_LIBRARY_SUFFIX}")