[qpid-proton] fix patch after changes to upstream build (#1610)

This is a temporary workaround until I can get
* https://github.com/apache/qpid-proton/pull/143
* and https://github.com/apache/qpid-proton/pull/146
reviewed and merged in upstream.

After that, no patches should be necessary.
This commit is contained in:
Jiří Daněk 2018-07-12 19:11:50 +02:00 committed by Abhishek Arya
parent c25212663d
commit b3e75a1143
4 changed files with 13 additions and 20 deletions

View File

@ -25,4 +25,3 @@ RUN git clone git://git.apache.org/qpid-proton.git
WORKDIR qpid-proton
COPY build.sh $SRC/
COPY c_tests_fuzz_CMakeLists.patch $SRC/
COPY c_CMakeLists.patch $SRC/

View File

@ -15,11 +15,10 @@
#
################################################################################
patch -p1 < $SRC/c_tests_fuzz_CMakeLists.patch
patch -p1 < $SRC/c_CMakeLists.patch
patch -p1 < $SRC/c_tests_fuzz_CMakeLists.patch || (cat c/tests/fuzz/CMakeLists.txt.rej && false)
mkdir build
pushd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_FUZZ_TESTING=ON -DFUZZ_REGRESSION_TESTS=OFF
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_STATIC_LIBS=ON -DENABLE_FUZZ_TESTING=ON -DFUZZ_REGRESSION_TESTS=OFF
pushd c/tests/fuzz/
make -j $(nproc)
popd

View File

@ -1,13 +0,0 @@
diff --git a/c/CMakeLists.txt b/c/CMakeLists.txt
index 40b50374..2247e0f1 100644
--- a/c/CMakeLists.txt
+++ b/c/CMakeLists.txt
@@ -539,7 +539,7 @@ if (BUILD_WITH_CXX)
endif (BUILD_WITH_CXX)
add_library (
- qpid-proton-core SHARED
+ qpid-proton-core STATIC
${qpid-proton-core}
${qpid-proton-layers}
${qpid-proton-platform}

View File

@ -1,11 +1,19 @@
diff --git a/c/tests/fuzz/CMakeLists.txt b/c/tests/fuzz/CMakeLists.txt
index f870d617..054ec6d6 100644
index f870d617..c9d46168 100644
--- a/c/tests/fuzz/CMakeLists.txt
+++ b/c/tests/fuzz/CMakeLists.txt
@@ -33,6 +33,8 @@ add_library (StandaloneFuzzTargetMain STATIC StandaloneFuzzTargetMain.c Standalo
@@ -32,7 +32,15 @@ add_library (StandaloneFuzzTargetMain STATIC StandaloneFuzzTargetMain.c Standalo
macro (pn_add_fuzz_test test)
add_executable (${test} ${ARGN})
target_link_libraries (${test} qpid-proton-core ${FUZZING_LIBRARY})
- target_link_libraries (${test} qpid-proton-core ${FUZZING_LIBRARY})
+ # prefer static lib for the fuzzer, if available
+ if (BUILD_STATIC_LIBS)
+ set(FUZZING_QPID_PROTON_CORE_LIBRARY qpid-proton-core-static)
+ else()
+ set(FUZZING_QPID_PROTON_CORE_LIBRARY qpid-proton-core)
+ endif()
+ target_link_libraries (${test} ${FUZZING_QPID_PROTON_CORE_LIBRARY} ${FUZZING_LIBRARY})
+ # -lFuzzingEngine is a C++ library, which needs c++ std lib
+ set_target_properties(${test} PROPERTIES LINKER_LANGUAGE CXX)