Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
KEP-1017 Integrate boost build with cmake
Browse files Browse the repository at this point in the history
WIP 2
  • Loading branch information
ebruck committed Jan 22, 2019
1 parent ae67b66 commit 58a08bb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 79 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,18 @@ compiler:

before_script:
- cd ${TRAVIS_BUILD_DIR}
- travis_wait source $TRAVIS_BUILD_DIR/toolchain/install-boost.sh
- mkdir build
- cd build
- >
source ${TRAVIS_BUILD_DIR}/toolchain/install-boost.sh && ${CMAKE_COMMAND} -DBOOST_ROOT:PATHNAME=$BOOST_ROOT
${CMAKE_COMMAND}
-DPROJECT_VERSION_MAJOR=${PROJECT_VERSION_MAJOR}
-DPROJECT_VERSION_MINOR=${PROJECT_VERSION_MINOR}
-DPROJECT_VERSION_PATCH=${PROJECT_VERSION_PATCH} ..
script:
- ${CXX} --version
- echo CXXFLAGS=${CXXFLAGS}
- make boost
- make openssl
- make rocksdb
- make
Expand All @@ -102,7 +102,7 @@ script:
after_success:
- |
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
coveralls -r ${TRAVIS_BUILD_DIR} -e 'build/openssl' -e 'build/rocksdb' -e 'build/jsoncpp' -e 'build/googletest' -e 'build/proto' -e 'build/CMakeFiles' -e 'build/swarm_version.hpp' -e 'audit/test' -e 'bootstrap/test' -e 'chaos/test' -e 'crud/test' -e 'crypto/test' -e 'ethereum/test' -e 'http/test' -e 'mocks' -e 'node/test' -e 'options/test' -e 'pbft/test' -e 'raft/test' -e 'status/test' -e 'storage/test' -e 'swarm' -e 'include' -e 'utils/test' --gcov-options '\-lp'
coveralls -r ${TRAVIS_BUILD_DIR} -e 'build/boost' -e 'build/openssl' -e 'build/rocksdb' -e 'build/jsoncpp' -e 'build/googletest' -e 'build/proto' -e 'build/CMakeFiles' -e 'build/swarm_version.hpp' -e 'audit/test' -e 'bootstrap/test' -e 'chaos/test' -e 'crud/test' -e 'crypto/test' -e 'ethereum/test' -e 'http/test' -e 'mocks' -e 'node/test' -e 'options/test' -e 'pbft/test' -e 'raft/test' -e 'status/test' -e 'storage/test' -e 'swarm' -e 'include' -e 'utils/test' --gcov-options '\-lp'
fi
- echo ${TRAVIS_BRANCH}
- if [ "$TRAVIS_BRANCH" = "master" ] ; then PACKAGE_COMPONENT="stable" ; else PACKAGE_COMPONENT="unstable" ; fi
Expand Down
42 changes: 3 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,7 @@ If you want to deploy your swarm immediately you can use our docker-compose quic

### Installation - macOSX

**Boost**

```text
$ export BOOST_VERSION="1.68.0"
$ export BOOST_INSTALL_DIR="$HOME/myboost"
$ mkdir -p ~/myboost
$ toolchain/install-boost.sh
```

This will result in a custom Boost install at `~/myboost/1_68_0/`that will not collide with your system's Boost.

**Other dependencies \(Protobuf, CMake\)**
**Dependencies \(Protobuf, CMake\)**

```text
$ brew update && brew install protobuf && brew install snappy && brew install lz4 && brew upgrade cmake
Expand All @@ -53,20 +41,6 @@ $ brew install ccache

### Installation - Ubuntu

**Boost**

Open up a console and install the compatible version of Boost:

```text
$ ENV BOOST_VERSION="1.68.0"
$ ENV BOOST_INSTALL_DIR="$HOME/myboost"
$ mkdir -p ~/myboost
$ toolchain/install-boost.sh
```

This will result in a custom Boost install at `~/myboost/1_68_0/`that will not overwrite your system's Boost.

**CMake**

```text
Expand All @@ -90,16 +64,6 @@ If available, cmake will attempt to use ccache \([https://ccache.samba.org](http
$ sudo apt-get install ccache
```

### Building the Daemon with CLion IDE

Ensure that you set your cmake args to pass in:

```text
-DBOOST_ROOT:PATHNAME=$HOME/myboost/1_68_0/
```

The project root can be directly imported into CLion.

### Building the Daemon from Command Line Interface \(CLI\)

Here are the steps to build the Daemon and unit test application from the command line:
Expand All @@ -109,7 +73,7 @@ Here are the steps to build the Daemon and unit test application from the comman
```text
$ mkdir build
$ cd build
$ cmake -DBOOST_ROOT:PATHNAME=$HOME/myboost/1_68_0/ ..
$ cmake ..
$ sudo make install
```

Expand All @@ -118,7 +82,7 @@ $ sudo make install
```text
$ mkdir build
$ cd build
$ ~/mycmake/bin/cmake -DBOOST_ROOT:PATHNAME=$HOME/myboost/1_68_0/ ..
$ ~/mycmake/bin/cmake ..
$ sudo make install
```

Expand Down
37 changes: 0 additions & 37 deletions toolchain/install-boost.sh

This file was deleted.

0 comments on commit 58a08bb

Please sign in to comment.