mirror of
https://github.com/zeromq/cppzmq.git
synced 2024-12-12 10:33:52 +01:00
Problem: libzmq builds with tests
libzmq build with default settings now which build all the tests and performance tools. This is not required for cppzmq build and slows down it only. Solution: disable tests build for libzmq and make it release only.
This commit is contained in:
parent
f35cbe2930
commit
3dc20bb05a
17
ci_build.sh
17
ci_build.sh
@ -10,12 +10,17 @@ if [ "$DRAFT" = "1" ] ; then
|
||||
export ZEROMQ_CMAKE_FLAGS="-DENABLE_DRAFTS=ON"
|
||||
fi
|
||||
|
||||
LIBZMQ=${PWD}/libzmq-build
|
||||
CPPZMQ=${PWD}/cppzmq-build
|
||||
install_zeromq() {
|
||||
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION}.tar.gz \
|
||||
>zeromq.tar.gz
|
||||
tar -xvzf zeromq.tar.gz
|
||||
cmake -Hlibzmq-${ZMQ_VERSION} -Blibzmq ${ZEROMQ_CMAKE_FLAGS}
|
||||
cmake --build libzmq
|
||||
cmake -Hlibzmq-${ZMQ_VERSION} -B${LIBZMQ} -DWITH_PERF_TOOL=OFF \
|
||||
-DZMQ_BUILD_TESTS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
${ZEROMQ_CMAKE_FLAGS}
|
||||
cmake --build ${LIBZMQ}
|
||||
}
|
||||
|
||||
# build zeromq first
|
||||
@ -24,14 +29,14 @@ if [ "${ZMQ_VERSION}" != "" ] ; then install_zeromq ; fi
|
||||
|
||||
# build cppzmq
|
||||
pushd .
|
||||
ZeroMQ_DIR=libzmq cmake -H. -Bbuild ${ZEROMQ_CMAKE_FLAGS}
|
||||
cmake --build build
|
||||
cd build
|
||||
ZeroMQ_DIR=${LIBZMQ} cmake -H. -B${CPPZMQ} ${ZEROMQ_CMAKE_FLAGS}
|
||||
cmake --build ${CPPZMQ}
|
||||
cd ${CPPZMQ}
|
||||
ctest -V
|
||||
popd
|
||||
|
||||
# build cppzmq demo
|
||||
ZeroMQ_DIR=libzmq cppzmq_DIR=build cmake -Hdemo -Bdemo/build
|
||||
ZeroMQ_DIR=${LIBZMQ} cppzmq_DIR=${CPPZMQ} cmake -Hdemo -Bdemo/build
|
||||
cmake --build demo/build
|
||||
cd demo/build
|
||||
ctest
|
||||
|
@ -15,7 +15,8 @@ target_link_libraries(
|
||||
cppzmq
|
||||
)
|
||||
|
||||
include_directories(${ZeroMQ_INCLUDE_DIR} ${cppzmq_INCLUDE_DIR})
|
||||
target_include_directories(demo PRIVATE ${cppzmq_INCLUDE_DIR}
|
||||
${ZeroMQ_INCLUDE_DIR})
|
||||
|
||||
add_test(
|
||||
NAME
|
||||
|
@ -33,10 +33,11 @@ add_executable(
|
||||
target_link_libraries(
|
||||
unit_tests
|
||||
gtest_main
|
||||
libzmq
|
||||
cppzmq
|
||||
)
|
||||
|
||||
target_include_directories(unit_tests PRIVATE ..)
|
||||
target_include_directories(unit_tests PRIVATE ${cppzmq_INCLUDE_DIR}
|
||||
${ZeroMQ_INCLUDE_DIR})
|
||||
|
||||
add_test(
|
||||
NAME
|
||||
|
Loading…
Reference in New Issue
Block a user