Skip to content
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
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# Source: https://github.com/boostorg/hana/blob/master/.travis.yml

# Sudo is required for installing recent versions of dependencies.
sudo: required

# Use C++ build environment.
language: cpp

Expand Down Expand Up @@ -32,8 +29,8 @@ install:
# Install a recent version of the Protobuf
- |
PROTOBUF_URL="https://github.com/google/protobuf/releases/download/v3.2.0/protobuf-cpp-3.2.0.tar.gz"
if [ ! -f ${DEPS_DIR}/protobuf/src/.libs/protoc ] ; then mkdir -p protobuf ; travis_retry wget --no-check-certificate --quiet -O - ${PROTOBUF_URL} | tar --strip-components=1 -xz -C protobuf ; cd protobuf ; ./configure --prefix=/usr ; make ; else cd protobuf ; fi
sudo make install
if [ ! -f ${DEPS_DIR}/protobuf/install/bin/protoc ] ; then mkdir -p protobuf ; travis_retry wget --no-check-certificate --quiet -O - ${PROTOBUF_URL} | tar --strip-components=1 -xz -C protobuf ; cd protobuf ; ./configure --prefix=${DEPS_DIR}/protobuf/install ; make ; make install ; fi
export PATH=${DEPS_DIR}/protobuf/install/bin:${PATH}

# Change directory back to default build directory.
before_script:
Expand All @@ -43,7 +40,7 @@ before_script:
script:
- mkdir -p build
- cd build
- cmake ..
- cmake -D CMAKE_PREFIX_PATH:PATH=${DEPS_DIR}/protobuf/install ..
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why didn't you write it like CMAKE_PREFIX_PATH=${DEPS_DIR}/protobuf/install:${PATH}? Does the current version do something different?

Copy link
Contributor

Choose a reason for hiding this comment

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

The -D command-line flag vs. environment variable is mostly just our default practice to avoid reliance on environment variables which are passed through to other processes. The reason we don't append the PATH is that CMAKE_PREFIX_PATH is just a set of additional paths to look for packages, which defaults to empty. cmake will continue to use the PATH environment variable normally in any case.

- cmake --build .
- cd ..
- python setup.py build
Expand Down