File tree Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Expand file tree Collapse file tree 3 files changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -10,12 +10,17 @@ if [ "$DRAFT" = "1" ] ; then
10
10
export ZEROMQ_CMAKE_FLAGS=" -DENABLE_DRAFTS=ON"
11
11
fi
12
12
13
+ LIBZMQ=${PWD} /libzmq-build
14
+ CPPZMQ=${PWD} /cppzmq-build
13
15
install_zeromq () {
14
16
curl -L https://github.com/zeromq/libzmq/archive/v${ZMQ_VERSION} .tar.gz \
15
17
> zeromq.tar.gz
16
18
tar -xvzf zeromq.tar.gz
17
- cmake -Hlibzmq-${ZMQ_VERSION} -Blibzmq ${ZEROMQ_CMAKE_FLAGS}
18
- cmake --build libzmq
19
+ cmake -Hlibzmq-${ZMQ_VERSION} -B${LIBZMQ} -DWITH_PERF_TOOL=OFF \
20
+ -DZMQ_BUILD_TESTS=OFF \
21
+ -DCMAKE_BUILD_TYPE=Release \
22
+ ${ZEROMQ_CMAKE_FLAGS}
23
+ cmake --build ${LIBZMQ}
19
24
}
20
25
21
26
# build zeromq first
@@ -24,14 +29,14 @@ if [ "${ZMQ_VERSION}" != "" ] ; then install_zeromq ; fi
24
29
25
30
# build cppzmq
26
31
pushd .
27
- ZeroMQ_DIR=libzmq cmake -H. -Bbuild ${ZEROMQ_CMAKE_FLAGS}
28
- cmake --build build
29
- cd build
32
+ ZeroMQ_DIR=${LIBZMQ} cmake -H. -B ${CPPZMQ} ${ZEROMQ_CMAKE_FLAGS}
33
+ cmake --build ${CPPZMQ}
34
+ cd ${CPPZMQ}
30
35
ctest -V
31
36
popd
32
37
33
38
# build cppzmq demo
34
- ZeroMQ_DIR=libzmq cppzmq_DIR=build cmake -Hdemo -Bdemo/build
39
+ ZeroMQ_DIR=${LIBZMQ} cppzmq_DIR=${CPPZMQ} cmake -Hdemo -Bdemo/build
35
40
cmake --build demo/build
36
41
cd demo/build
37
42
ctest
Original file line number Diff line number Diff line change @@ -15,7 +15,8 @@ target_link_libraries(
15
15
cppzmq
16
16
)
17
17
18
- include_directories (${ZeroMQ_INCLUDE_DIR} ${cppzmq_INCLUDE_DIR} )
18
+ target_include_directories (demo PRIVATE ${cppzmq_INCLUDE_DIR}
19
+ ${ZeroMQ_INCLUDE_DIR} )
19
20
20
21
add_test (
21
22
NAME
Original file line number Diff line number Diff line change @@ -33,10 +33,11 @@ add_executable(
33
33
target_link_libraries (
34
34
unit_tests
35
35
gtest_main
36
- libzmq
36
+ cppzmq
37
37
)
38
38
39
- target_include_directories (unit_tests PRIVATE .. )
39
+ target_include_directories (unit_tests PRIVATE ${cppzmq_INCLUDE_DIR}
40
+ ${ZeroMQ_INCLUDE_DIR} )
40
41
41
42
add_test (
42
43
NAME
You can’t perform that action at this time.
0 commit comments