Skip to content
Extraits de code Groupes Projets
Valider d5636dc1 rédigé par Thomas Goyne's avatar Thomas Goyne
Parcourir les fichiers

Use -Werror for compiler flag support checks so that they actually work

parent 7ba94685
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
AC_DEFUN([AC_C_FLAG], [{
AC_LANG_PUSH(C)
ac_c_flag_save="$CFLAGS"
CFLAGS="$CFLAGS $1"
CFLAGS="$CFLAGS -Werror $1"
AC_MSG_CHECKING([[whether $CC supports $1]])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]])],
[AC_MSG_RESULT([yes])],
[
CFLAGS="$ac_c_flag_save $1"
AC_MSG_RESULT([yes])
], [
CFLAGS="$ac_c_flag_save"
AC_MSG_RESULT([no])
$2
......@@ -16,11 +18,14 @@ AC_DEFUN([AC_C_FLAG], [{
AC_DEFUN([AC_CXX_FLAG], [{
AC_LANG_PUSH(C++)
ac_cxx_flag_save="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS $1"
CXXFLAGS="$CXXFLAGS -Werror $1"
AC_MSG_CHECKING([[whether $CXX supports $1]])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]])],
[AC_MSG_RESULT([yes])],
[
CXXFLAGS="$ac_cxx_flag_save $1"
AC_MSG_RESULT([yes])
],
[
CXXFLAGS="$ac_cxx_flag_save"
AC_MSG_RESULT([no])
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter