The style was changed to match the official manual [1], the install
configuration was simplified and now matches the official packaging
guide [2], and the config files use the CMake-specific variable syntax
${VAR} instead of the autoconf-compatible syntax @VAR@, as documented in
[3]. The public header files are declared as such (for CMake 3.3+), and
the generated headers are included in the library target definition.
The tests are only built if SNAPPY_BUILD_TESTS (default ON) is true, so
zippy can be easily used in projects that add_subdirectory() its source
code directly, instead of using find_package().
[1] https://cmake.org/cmake/help/git-master/manual/cmake-language.7.html
[2] https://cmake.org/cmake/help/git-master/manual/cmake-packages.7.html
[3] https://cmake.org/cmake/help/git-master/command/configure_file.html
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
# Build matrix / environment variables are explained on:
|
|
# http://about.travis-ci.org/docs/user/build-configuration/
|
|
# This file can be validated on: http://lint.travis-ci.org/
|
|
|
|
sudo: false
|
|
dist: trusty
|
|
language: cpp
|
|
|
|
compiler:
|
|
- gcc
|
|
- clang
|
|
os:
|
|
- linux
|
|
- osx
|
|
|
|
env:
|
|
- BUILD_TYPE=Debug
|
|
- BUILD_TYPE=RelWithDebInfo
|
|
|
|
matrix:
|
|
allow_failures:
|
|
- compiler: clang
|
|
env: BUILD_TYPE=RelWithDebInfo
|
|
|
|
addons:
|
|
apt:
|
|
# List of whitelisted in travis packages for ubuntu-trusty can be found here:
|
|
# https://github.com/travis-ci/apt-package-whitelist/blob/master/ubuntu-trusty
|
|
# List of whitelisted in travis apt-sources:
|
|
# https://github.com/travis-ci/apt-source-whitelist/blob/master/ubuntu.json
|
|
sources:
|
|
- ubuntu-toolchain-r-test
|
|
- llvm-toolchain-trusty-4.0
|
|
packages:
|
|
- cmake
|
|
- gcc-6
|
|
- g++-6
|
|
- clang-4.0
|
|
|
|
install:
|
|
# Travis doesn't have a nice way to install homebrew packages yet.
|
|
# https://github.com/travis-ci/travis-ci/issues/5377
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew update; fi
|
|
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install gcc@6; fi
|
|
# /usr/bin/gcc is stuck to old versions by on both Linux and OSX.
|
|
- if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
|
|
- echo ${CC}
|
|
- echo ${CXX}
|
|
- ${CXX} --version
|
|
- cmake --version
|
|
|
|
before_script:
|
|
- mkdir -p build && cd build
|
|
- cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE
|
|
- cmake --build .
|
|
- cd ..
|
|
|
|
script:
|
|
- build/snappy_unittest |