2018-03-28 11:44:20 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
|
|
|
|
install_zeromq() {
|
|
|
|
pushd .
|
|
|
|
|
|
|
|
mkdir libzmq
|
|
|
|
cd libzmq
|
2018-03-29 18:14:34 +02:00
|
|
|
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION}.tar.gz >zeromq.tar.gz
|
2018-03-28 11:44:20 +02:00
|
|
|
tar -xvzf zeromq.tar.gz
|
2018-03-29 18:14:34 +02:00
|
|
|
cd libzmq-${ZMQ_VERSION}
|
2018-03-28 11:44:20 +02:00
|
|
|
|
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
sudo make -j4 install
|
|
|
|
|
|
|
|
popd
|
|
|
|
}
|
|
|
|
|
|
|
|
# build zeromq first
|
|
|
|
|
|
|
|
if [ "${ZMQ_VERSION}" != "" ] ; then install_zeromq ; fi
|
|
|
|
|
|
|
|
# build cppzmq
|
|
|
|
|
2018-03-29 17:34:21 +02:00
|
|
|
pushd .
|
2018-03-28 11:44:20 +02:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
2018-04-02 13:21:11 +02:00
|
|
|
cmake --build .
|
2018-03-28 11:44:20 +02:00
|
|
|
sudo make -j4 install
|
2018-04-02 13:21:11 +02:00
|
|
|
make test ARGS="-V"
|
2018-03-29 17:34:21 +02:00
|
|
|
popd
|
2018-03-28 11:44:20 +02:00
|
|
|
|
2018-04-02 13:21:11 +02:00
|
|
|
# build cppzmq demo
|
|
|
|
cd demo
|
2018-03-29 17:34:21 +02:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
cmake ..
|
|
|
|
cmake --build .
|
|
|
|
ctest
|