Skip to content

Commit 8dfec11

Browse files
committed
Problem: libzmq pkg-config build not tested
Solution: build and install libzmq using autogen tools.
1 parent 6fe3d54 commit 8dfec11

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

.travis.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,10 @@ matrix:
2626
- os: linux
2727
env: ZMQ_VERSION=4.2.5
2828

29-
# GCC default, draft disabled, older libzmq
29+
# GCC default, draft disabled, older libzmq, libzmq with pkg-config
3030
- os: linux
31-
env: ZMQ_VERSION=4.2.4
31+
sudo: true
32+
env: ZMQ_VERSION=4.2.0 BUILD_TYPE=pkgconf
3233

3334
# GCC 7, draft enabled, latest libzmq
3435
- os: linux
@@ -49,8 +50,6 @@ matrix:
4950
# packages:
5051
# - clang-5.0
5152

52-
sudo: false
53-
5453
before_install:
5554
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then pip install --user cpp-coveralls; fi
5655

ci_build.sh

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
set -x
44
set -e
55

6+
BUILD_TYPE=${BUILD_TYPE:-cmake}
67
LIBZMQ=${PWD}/libzmq-build
78
CPPZMQ=${PWD}/cppzmq-build
89
# Travis machines have 2 cores
@@ -19,11 +20,21 @@ install_zeromq() {
1920
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION}.tar.gz \
2021
>zeromq.tar.gz
2122
tar -xvzf zeromq.tar.gz
22-
cmake -Hlibzmq-${ZMQ_VERSION} -B${LIBZMQ} -DWITH_PERF_TOOL=OFF \
23-
-DZMQ_BUILD_TESTS=OFF \
24-
-DCMAKE_BUILD_TYPE=Release \
25-
${ZEROMQ_CMAKE_FLAGS}
26-
cmake --build ${LIBZMQ} -- -j${JOBS}
23+
if [ "$BUILD_TYPE" = "cmake" ] ; then
24+
cmake -Hlibzmq-${ZMQ_VERSION} -B${LIBZMQ} -DWITH_PERF_TOOL=OFF \
25+
-DZMQ_BUILD_TESTS=OFF \
26+
-DCMAKE_BUILD_TYPE=Release \
27+
${ZEROMQ_CMAKE_FLAGS}
28+
cmake --build ${LIBZMQ} -- -j${JOBS}
29+
elif [ "$BUILD_TYPE" = "pkgconf" ] ; then
30+
pushd .
31+
cd libzmq-${ZMQ_VERSION}
32+
./autogen.sh &&
33+
./configure &&
34+
make VERBOSE=1 -j${JOBS}
35+
sudo make install
36+
popd
37+
fi
2738
}
2839

2940
# build zeromq first
@@ -34,6 +45,9 @@ if [ "${ZMQ_VERSION}" != "" ] ; then install_zeromq ; fi
3445
pushd .
3546
ZeroMQ_DIR=${LIBZMQ} cmake -H. -B${CPPZMQ} ${ZEROMQ_CMAKE_FLAGS}
3647
cmake --build ${CPPZMQ} -- -j${JOBS}
48+
if [ "$BUILD_TYPE" = "pkgconf" ] ; then
49+
sudo cmake --build ${CPPZMQ} --target install
50+
fi
3751
cd ${CPPZMQ}
3852
ctest -V -j${JOBS}
3953
popd

0 commit comments

Comments
 (0)