Skip to content

Travis CI: fix libboost package issue #121

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 29, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 42 additions & 21 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,32 @@ matrix:
include:
- os: linux
env:
- COMPILER=g++-5 STDLIB=libc++
- COMPILER=g++-7
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'george-edison55-precise-backports']
packages: ["g++-5", "cmake-data", "cmake"]
sources: ['ubuntu-toolchain-r-test']
packages: ["g++-7", "cmake-data", "cmake"]
- os: linux
env:
- COMPILER=g++-4.8 USE_BOOST_REGEX=ON
- COMPILER=g++-8
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'george-edison55-precise-backports', 'boost-latest']
packages: ["g++-4.8", "cmake-data", "cmake", "libboost-regex1.55-dev"]
sources: ['ubuntu-toolchain-r-test']
packages: ["g++-8", "cmake-data", "cmake"]
- os: linux
env:
- COMPILER=g++-9
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ["g++-9", "cmake-data", "cmake"]
- os: linux
env:
- COMPILER=g++-9 USE_BOOST_REGEX=ON
addons:
apt:
sources: ['ubuntu-toolchain-r-test']
packages: ["g++-9", "cmake-data", "cmake", "libboost-regex-dev"]

- os: linux
env:
Expand All @@ -28,11 +42,11 @@ matrix:

- os: linux
env:
- COMPILER=clang++-3.7 STDLIB=libc++
- COMPILER=clang++-8 STDLIB=libc++
addons:
apt:
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-precise-3.7', 'george-edison55-precise-backports']
packages: ["clang-3.7", "cmake-data", "cmake"]
sources: ['ubuntu-toolchain-r-test', 'llvm-toolchain-trusty-8']
packages: ["clang-8", "cmake-data", "cmake"]

- os: osx
osx_image: xcode9.4
Expand All @@ -50,25 +64,32 @@ matrix:
env:
- COMPILER=clang++ V='Apple LLVM 11.0'
- COMPILER=clang++ V='Apple LLVM 11.0' WITH_CPP14=true
- os: osx
osx_image: xcode11.2
env:
- COMPILER=clang++ V='Apple LLVM 11.0'
- COMPILER=clang++ V='Apple LLVM 11.0' WITH_CPP17=true

before_install:
# - |
# if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
# brew update
# brew rm --force cmake && brew install cmake
# fi

- CMAKE_CXX_FLAGS+=" -Wall"

- if [[ "${WITH_CPP14}" == "true" ]]; then CMAKE_OPTIONS+=" -DCMAKE_CXX_STANDARD=14"; fi
- |
if [[ "${WITH_CPP14}" == "true" ]]; then
CMAKE_OPTIONS+=" -DCMAKE_CXX_STANDARD=14"
fi
- |
if [[ "${WITH_CPP17}" == "true" ]]; then
CMAKE_OPTIONS+=" -DCMAKE_CXX_STANDARD=17"
fi
- |
if [[ "${USE_BOOST_REGEX}" == "ON" ]]; then
CMAKE_OPTIONS+=" -DUSE_BOOST_REGEX=ON"
CMAKE_OPTIONS+=" -DBoost_REGEX_LIBRARY_DEBUG=/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.55.0"
CMAKE_OPTIONS+=" -DBoost_REGEX_LIBRARY_RELEASE=/usr/lib/x86_64-linux-gnu/libboost_regex.so.1.55.0"
CMAKE_OPTIONS+=" -DBoost_REGEX_LIBRARY_DEBUG=/usr/lib/x86_64-linux-gnu/libboost_regex.so"
CMAKE_OPTIONS+=" -DBoost_REGEX_LIBRARY_RELEASE=/usr/lib/x86_64-linux-gnu/libboost_regex.so"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could be cleaner to do the linking inside the CMakeLists.txt. This could would also be simpler to port this file to appveyor

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though it is a secondary issue that could be solved in a separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are defines that tell CMake where it can look for the installed boost libraries; this is specific to Travis so this would not belong to the CMake file (although I am curious why this is needed at all; open to additional futzing around on this in new PR).

fi
- |
if [[ "${STDLIB}" == "libc++" ]]; then
CMAKE_CXX_FLAGS+=" -stdlib=libc++"
fi
- if [[ "${STDLIB}" == "libc++" ]]; then CMAKE_CXX_FLAGS+=" -stdlib=libc++"; fi

- ${COMPILER} --version

before_script:
Expand Down