This is an automated email from the ASF dual-hosted git repository.
mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new d18c07b Fixed C++ CMake dependency and enabled parallel build (#3084)
d18c07b is described below
commit d18c07be18e442b9fc34f994adecf654208bd265
Author: Matteo Merli <[email protected]>
AuthorDate: Wed Nov 28 21:53:08 2018 -0800
Fixed C++ CMake dependency and enabled parallel build (#3084)
* Fixed C++ CMake dependency and enabled parallel build
* Fixed also for examples
---
pulsar-client-cpp/docker-build.sh | 2 +-
pulsar-client-cpp/examples/CMakeLists.txt | 20 ++++++++++----------
pulsar-client-cpp/tests/CMakeLists.txt | 2 +-
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/pulsar-client-cpp/docker-build.sh
b/pulsar-client-cpp/docker-build.sh
index b0439b1..35c2061 100755
--- a/pulsar-client-cpp/docker-build.sh
+++ b/pulsar-client-cpp/docker-build.sh
@@ -41,4 +41,4 @@ DOCKER_CMD="docker run -i -v $ROOT_DIR:/pulsar $IMAGE"
find . -name CMakeCache.txt | xargs rm -f
find . -name CMakeFiles | xargs rm -rf
-$DOCKER_CMD bash -c "cd /pulsar/pulsar-client-cpp && cmake . $CMAKE_ARGS &&
make check-format && make"
+$DOCKER_CMD bash -c "cd /pulsar/pulsar-client-cpp && cmake . $CMAKE_ARGS &&
make check-format && make -j8"
diff --git a/pulsar-client-cpp/examples/CMakeLists.txt
b/pulsar-client-cpp/examples/CMakeLists.txt
index 1480a87..fb225bb 100644
--- a/pulsar-client-cpp/examples/CMakeLists.txt
+++ b/pulsar-client-cpp/examples/CMakeLists.txt
@@ -6,9 +6,9 @@
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
-#
+#
# http://www.apache.org/licenses/LICENSE-2.0
-#
+#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -60,11 +60,11 @@ add_executable(SampleConsumerCApi
${SAMPLE_CONSUMER_C_SOURCES})
add_executable(SampleConsumerListenerCApi
${SAMPLE_CONSUMER_LISTENER_C_SOURCES})
add_executable(SampleReaderCApi ${SAMPLE_READER_C_SOURCES})
-target_link_libraries(SampleAsyncProducer ${CLIENT_LIBS})
-target_link_libraries(SampleConsumer ${CLIENT_LIBS})
-target_link_libraries(SampleConsumerListener ${CLIENT_LIBS})
-target_link_libraries(SampleProducer ${CLIENT_LIBS})
-target_link_libraries(SampleProducerCApi ${CLIENT_LIBS})
-target_link_libraries(SampleConsumerCApi ${CLIENT_LIBS})
-target_link_libraries(SampleConsumerListenerCApi ${CLIENT_LIBS})
-target_link_libraries(SampleReaderCApi ${CLIENT_LIBS})
\ No newline at end of file
+target_link_libraries(SampleAsyncProducer ${CLIENT_LIBS} pulsarShared)
+target_link_libraries(SampleConsumer ${CLIENT_LIBS} pulsarShared)
+target_link_libraries(SampleConsumerListener ${CLIENT_LIBS} pulsarShared)
+target_link_libraries(SampleProducer ${CLIENT_LIBS} pulsarShared)
+target_link_libraries(SampleProducerCApi ${CLIENT_LIBS} pulsarShared)
+target_link_libraries(SampleConsumerCApi ${CLIENT_LIBS} pulsarShared)
+target_link_libraries(SampleConsumerListenerCApi ${CLIENT_LIBS}
pulsarShared)
+target_link_libraries(SampleReaderCApi ${CLIENT_LIBS} pulsarShared)
diff --git a/pulsar-client-cpp/tests/CMakeLists.txt
b/pulsar-client-cpp/tests/CMakeLists.txt
index 5981627..8f3905b 100644
--- a/pulsar-client-cpp/tests/CMakeLists.txt
+++ b/pulsar-client-cpp/tests/CMakeLists.txt
@@ -25,4 +25,4 @@ add_executable(main ${TEST_SOURCES})
target_include_directories(main PRIVATE ${CMAKE_SOURCE_DIR}/lib)
-target_link_libraries(main ${CLIENT_LIBS} ${GMOCK_LIBRARY_PATH})
+target_link_libraries(main ${CLIENT_LIBS} pulsarShared ${GMOCK_LIBRARY_PATH})