From 8679124272eb731c0e073e36c38e5e50651f9893 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= Date: Sun, 15 Jan 2017 02:50:14 +0100 Subject: [PATCH] build-style cmake: replace -isystem with -I Many packages depending on Qt5 or Qt4 and built with cmake generate "flags.make" files with -isystem for include paths. With gcc6 this results in e.g. "#include_next " giving an error, because a -isystem /usr/include is in the wrong place. The simple fix is to replace "-isystem" with just "-I". --- common/build-style/cmake.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh index 5fc1621b739..7cb2542c6fb 100644 --- a/common/build-style/cmake.sh +++ b/common/build-style/cmake.sh @@ -35,6 +35,9 @@ _EOF cmake ${cmake_args} ${configure_args} $(echo ${cmake_builddir}|sed \ -e 's|[^/]$|/|' -e 's|[^/]*||g' -e 's|/|../|g') + + # Replace -isystem with -I for Qt4 and Qt5 packages + find -name flags.make -exec sed -i "{}" -e"s;-isystem;-I;g" \; } do_build() {