1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-23 00:28:48 -05:00

configure: convert -I to -isystem as a last step

As all the -I uses in CFLAGS at that point are for system headers and
third party libraries this helps us remove/ignore warnings on those!

Closes #5060
This commit is contained in:
Daniel Stenberg 2020-03-08 11:08:13 +01:00
parent 77b62fe6e1
commit 27ea8fc2fa
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 6 additions and 5 deletions

View File

@ -4259,6 +4259,8 @@ if test "$want_thres" = "yes" && test "x$USE_THREADS_POSIX" != "x1"; then
fi
fi
CURL_CONVERT_INCLUDE_TO_ISYSTEM
dnl ************************************************************
dnl disable verbose text strings
dnl

View File

@ -452,8 +452,10 @@ dnl GNUC versions these warnings are not silenced.
AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
AC_REQUIRE([CURL_CHECK_COMPILER])dnl
AC_MSG_CHECKING([convert -I options to -isystem])
if test "$compiler_id" = "GNU_C" ||
test "$compiler_id" = "CLANG"; then
AC_MSG_RESULT([yes])
tmp_has_include="no"
tmp_chg_FLAGS="$CFLAGS"
for word1 in $tmp_chg_FLAGS; do
@ -484,6 +486,8 @@ AC_DEFUN([CURL_CONVERT_INCLUDE_TO_ISYSTEM], [
CPPFLAGS="$tmp_chg_FLAGS"
squeeze CPPFLAGS
fi
else
AC_MSG_RESULT([no])
fi
])
@ -569,11 +573,6 @@ AC_DEFUN([CURL_SET_COMPILER_BASIC_OPTS], [
AC_REQUIRE([CURL_SHFUNC_SQUEEZE])dnl
#
if test "$compiler_id" != "unknown"; then
#
if test "$compiler_id" = "GNU_C" ||
test "$compiler_id" = "CLANG"; then
CURL_CONVERT_INCLUDE_TO_ISYSTEM
fi
#
tmp_save_CPPFLAGS="$CPPFLAGS"
tmp_save_CFLAGS="$CFLAGS"