From 56f66372c52bf7f4dfb86b56b5b348f1c75bf13c Mon Sep 17 00:00:00 2001 From: Simon Date: Sun, 16 Apr 2017 00:30:58 -0700 Subject: [PATCH] Fix proton build issue with debian jessie, as used on CI servers. Debian 8 stable ships with gcc 4.9.2 and cmake 3.0.2. Previously the depends package used CMAKE_CXX_STANDARD to tell cmake to use C++11, but the option requires cmakes 3.1+. To resolve the issue we now update relevant CMakeLists.txt and set CMAKE_CXX_FLAGS. --- depends/packages/proton.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/depends/packages/proton.mk b/depends/packages/proton.mk index fa1779ea..b898a666 100644 --- a/depends/packages/proton.mk +++ b/depends/packages/proton.mk @@ -6,6 +6,9 @@ $(package)_sha256_hash=6ffd26d3d0e495bfdb5d9fefc5349954e6105ea18cc4bb191161d2774 $(package)_dependencies= define $(package)_preprocess_cmds + sed -i '1i set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")' proton-c/bindings/cpp/CMakeLists.txt && \ + sed -i '1i set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")' examples/cpp/CMakeLists.txt && \ + sed -i '1i set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")' CMakeLists.txt && \ sed -i.old 's/qpid-proton SHARED/qpid-proton STATIC/' proton-c/CMakeLists.txt && \ sed -i.old 's/SASL/_DO_NOT_BUILD_SASL_/' proton-c/CMakeLists.txt && \ sed -i.old 's/qpid-proton-core SHARED/qpid-proton-core STATIC/' proton-c/CMakeLists.txt && \ @@ -20,8 +23,7 @@ define $(package)_config_cmds endef define $(package)_build_cmds - cd build; $(MAKE) VERBOSE=1 all && \ - cp CMakeCache.txt /tmp/CMakeCache.txt + cd build; $(MAKE) VERBOSE=1 endef define $(package)_stage_cmds