You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by si...@apache.org on 2019/01/20 03:09:16 UTC

[pulsar] branch master updated: [cpp-build] add argument to cpp incremental build (#3385)

This is an automated email from the ASF dual-hosted git repository.

sijie 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 9be5996  [cpp-build] add argument to cpp incremental build (#3385)
9be5996 is described below

commit 9be59964ca10b237d67b7d767caf7a2c01a8629f
Author: Rajan Dhabalia <rd...@apache.org>
AuthorDate: Sat Jan 19 19:09:11 2019 -0800

    [cpp-build] add argument to cpp incremental build (#3385)
    
    ### Motivation
    
    Provide a way to build pulsar-cpp client with incremental build option to avoid building it entirely and save build time.
    
    ### Modifications
    
     avoid cleaning build cache files.
    
    
    ### Result
    User can perform incremental build by `./docker-build.sh skip-clean`
---
 pulsar-client-cpp/docker-build.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/pulsar-client-cpp/docker-build.sh b/pulsar-client-cpp/docker-build.sh
index 35c2061..f8a2321 100755
--- a/pulsar-client-cpp/docker-build.sh
+++ b/pulsar-client-cpp/docker-build.sh
@@ -31,14 +31,16 @@ BUILD_IMAGE_VERSION="${BUILD_IMAGE_VERSION:-ubuntu-16.04}"
 
 IMAGE="$BUILD_IMAGE_NAME:$BUILD_IMAGE_VERSION"
 
-echo "---- Build Pulsar C++ client using image $IMAGE"
+echo "---- Build Pulsar C++ client using image $IMAGE (pass <skip-clean> for incremental build) "
 
 docker pull $IMAGE
 
 DOCKER_CMD="docker run -i -v $ROOT_DIR:/pulsar $IMAGE"
 
 # Remove any cached CMake relate file from previous builds
-find . -name CMakeCache.txt | xargs rm -f
-find . -name CMakeFiles | xargs rm -rf
+if [ "$1" != "skip-clean" ]; then
+	find . -name CMakeCache.txt | xargs rm -f
+	find . -name CMakeFiles | xargs rm -rf
+fi
 
 $DOCKER_CMD bash -c "cd /pulsar/pulsar-client-cpp && cmake . $CMAKE_ARGS && make check-format && make -j8"