From 9fdf9f341aa11c4ccddd2ab05a0e3ad01f3bc032 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?= Date: Sat, 20 Feb 2021 12:16:56 +0700 Subject: [PATCH] build-style/cmake: also fix -isystem for Ninja Discovered by cross-build failure of gnuradio-osmosdr. While we're at it, fix flags.make in batch. --- common/build-style/cmake.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh index 00ef3ff37e5..2eb512ee390 100644 --- a/common/build-style/cmake.sh +++ b/common/build-style/cmake.sh @@ -67,8 +67,12 @@ _EOF CFLAGS="${CFLAGS/ -pipe / }" CXXFLAGS="${CXXFLAGS/ -pipe / }" \ cmake ${cmake_args} ${configure_args} ${wrksrc}/${build_wrksrc} - # Replace -isystem with -I for Qt4 and Qt5 packages - find -name flags.make -exec sed -i "{}" -e"s;-isystem;-I;g" \; + # Replace -isystem with -I + if [ "$CMAKE_GENERATOR" = "Unix Makefiles" ]; then + find . -name flags.make -exec sed -i -e 's/-isystem/-I/g' + + elif [ "$CMAKE_GENERATOR" = Ninja ]; then + sed -i -e 's/-isystem/-I/g' build.ninja + fi } do_build() {