Skip to content

Commit

Permalink
[Build] CMake Improvements
Browse files Browse the repository at this point in the history
This includes some improvements and fixes for the CMake build system.

* Use explicit per-target includes instead of global includes for dependencies.
* Don't assume the availability of optional dependencies.
* Fix Ubuntu build issues relating to endian/byteswap.
* Ignore the qt subdir for windows WSL based builds.
* Add TravisCI stage to test CMake builds.

Windows support is still a work in progress, with the qt subdir being ignored
due to an issue with CMake linking against a static Qt library.

CMake Builds on TravisCI are allowed to fail for the time being.
  • Loading branch information
Fuzzbawls committed Sep 13, 2019
1 parent 91514a0 commit 09400fc
Show file tree
Hide file tree
Showing 5 changed files with 317 additions and 116 deletions.
56 changes: 56 additions & 0 deletions .travis.yml
Expand Up @@ -33,10 +33,12 @@ cache:
directories:
- $TRAVIS_BUILD_DIR/depends/built
- $TRAVIS_BUILD_DIR/depends/sdk-sources
- $TRAVIS_BUILD_DIR/cmake-build-debug
- $HOME/.ccache
stages:
- lint
- test
- cmake
env:
global:
- MAKEJOBS=-j3
Expand Down Expand Up @@ -70,6 +72,9 @@ after_script:
- echo $TRAVIS_COMMIT_RANGE
- echo $TRAVIS_COMMIT_LOG
jobs:
allow_failures:
- stage: cmake
fast_finish: true
include:

- stage: lint
Expand Down Expand Up @@ -207,3 +212,54 @@ jobs:
RUN_FUNCTIONAL_TESTS=false
GOAL="deploy"
BITCOIN_CONFIG="--enable-gui --enable-reduce-exports --enable-werror"
- stage: cmake
name: 'CMake Linux'
language: cpp
compiler:
- gcc
addons:
apt:
packages:
- python3-zmq qtbase5-dev qttools5-dev-tools libssl-dev libevent-dev bsdmainutils libboost-system-dev libboost-filesystem-dev libboost-chrono-dev libboost-program-options-dev libboost-test-dev libboost-thread-dev libdb5.3++-dev libminiupnpc-dev libzmq3-dev libprotobuf-dev protobuf-compiler libqrencode-dev libgmp-dev
before_install:
install:
before_script:
script:
- mkdir -p $TRAVIS_BUILD_DIR/cmake-build-debug && cd $TRAVIS_BUILD_DIR/cmake-build-debug
- cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" $TRAVIS_BUILD_DIR
- cmake --build $TRAVIS_BUILD_DIR/cmake-build-debug --target all -- -j 3

- stage: cmake
name: 'CMake macOS'
os: osx
osx_image: xcode10.1
language: cpp
compiler:
- clang
addons:
homebrew:
packages:
- autoconf
- automake
- berkeley-db4
- libtool
- boost
- miniupnpc
- openssl
- pkg-config
- protobuf
- python3
- qt5
- zmq
- libevent
- qrencode
- gmp
update: true
before_install:
install:
before_script:
script:
- mkdir -p $TRAVIS_BUILD_DIR/cmake-build-debug && cd $TRAVIS_BUILD_DIR/cmake-build-debug
- cmake -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" $TRAVIS_BUILD_DIR
- cmake --build $TRAVIS_BUILD_DIR/cmake-build-debug --target all -- -j 3

0 comments on commit 09400fc

Please sign in to comment.