From bb0de8eba8a2cb40a162ce838b0b0e2a418cddc3 Mon Sep 17 00:00:00 2001 From: jai1 Date: Wed, 1 Mar 2017 21:01:38 -0800 Subject: [PATCH] Added g++-4.4 to travis build (#266) --- pulsar-client-cpp/CMakeLists.txt | 4 ---- pulsar-client-cpp/travis-build.sh | 7 +++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/pulsar-client-cpp/CMakeLists.txt b/pulsar-client-cpp/CMakeLists.txt index aebfd768aaa0d..35f52d06d2fe2 100644 --- a/pulsar-client-cpp/CMakeLists.txt +++ b/pulsar-client-cpp/CMakeLists.txt @@ -21,8 +21,6 @@ set(Boost_NO_BOOST_CMAKE ON) set (CMAKE_CXX_FLAGS "-Wno-deprecated-declarations ${CMAKE_CXX_FLAGS}") -execute_process(COMMAND gcc -dumpversion OUTPUT_VARIABLE GCC_DUMP_VERSION) - find_package(Boost REQUIRED COMPONENTS program_options filesystem regex thread system) find_package(OpenSSL REQUIRED) find_package(ZLIB REQUIRED) @@ -64,8 +62,6 @@ set(CLIENT_LIBS pulsar ) -message( STATUS "GCC_DUMP_VERSION: " ${GCC_DUMP_VERSION} ) - add_subdirectory(lib) add_subdirectory(perf) add_subdirectory(examples) diff --git a/pulsar-client-cpp/travis-build.sh b/pulsar-client-cpp/travis-build.sh index 347c0eeccf80b..898620664460b 100755 --- a/pulsar-client-cpp/travis-build.sh +++ b/pulsar-client-cpp/travis-build.sh @@ -55,16 +55,15 @@ exec_cmd() { if [ "$3" = "all" -o "$3" = "dep" ]; then # Install dependant packages - exec_cmd "apt-get update && apt-get install -y cmake gcc-4.4 cpp-4.4 gcc-4.4-base libssl-dev libcurl4-openssl-dev liblog4cxx10-dev libprotobuf-dev libboost1.55-all-dev libgtest-dev libxml2-utils"; - exec_cmd "unlink `which gcc` && ln -s `which gcc-4.4` `which gcc`" + exec_cmd "apt-get update && apt-get install -y cmake gcc-4.4 cpp-4.4 gcc-4.4-base libssl-dev libcurl4-openssl-dev liblog4cxx10-dev libprotobuf-dev libboost1.55-all-dev libgtest-dev libxml2-utils g++-4.4"; exec_cmd "pushd $1/ && wget https://github.com/google/protobuf/releases/download/v2.6.1/protobuf-2.6.1.tar.gz && popd"; - exec_cmd "pushd /usr/src/gtest && cmake . && make && cp *.a /usr/lib && popd"; + exec_cmd "pushd /usr/src/gtest && CC=gcc-4.4 CXX=g++-4.4 cmake . && make && cp *.a /usr/lib && popd"; exec_cmd "pushd $1/ && tar xvfz $1/protobuf-2.6.1.tar.gz && pushd $1/protobuf-2.6.1 && ./configure && make && make install && popd && popd"; fi if [ "$3" = "all" -o "$3" = "compile" ]; then # Compile and run unit tests - exec_cmd "pushd $2/pulsar-client-cpp && cmake . && make && popd"; + exec_cmd "pushd $2/pulsar-client-cpp && CC=gcc-4.4 CXX=g++-4.4 cmake . && make && popd"; PULSAR_STANDALONE_CONF=$2/pulsar-client-cpp/tests/standalone.conf $2/bin/pulsar standalone & standalone_pid=$!; PULSAR_STANDALONE_CONF=$2/pulsar-client-cpp/tests/authentication.conf $2/bin/pulsar standalone --zookeeper-port 2191 --bookkeeper-port 3191 --zookeeper-dir data2/standalone/zookeeper --bookkeeper-dir data2/standalone/zookeeper &