Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SWIFT
SWIFTsim
Commits
e33b6ff6
Commit
e33b6ff6
authored
Aug 01, 2016
by
Matthieu Schaller
Browse files
Get the correct warning flags for the Intel compiler. Also add a -Werror for clang.
parent
e29af86f
Changes
1
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
e33b6ff6
...
...
@@ -440,8 +440,8 @@ AC_LINK_IFELSE([AC_LANG_PROGRAM(
AC_MSG_RESULT($rtc_ok)
# Add warning flags by default, if these can be used. Option =error adds
# -Werror to GCC and Intel. Note do this last as compiler tests may
become
# errors, if that's an issue don't use CFLAGS for these, use an AC_SUBST().
# -Werror to GCC
, clang
and Intel. Note do this last as compiler tests may
#
become
errors, if that's an issue don't use CFLAGS for these, use an AC_SUBST().
AC_ARG_ENABLE([compiler-warnings],
[AS_HELP_STRING([--enable-compiler-warnings],
[Enable compile time warning flags, if compiler is known @<:@error/no/yes)@:>@]
...
...
@@ -449,12 +449,23 @@ AC_ARG_ENABLE([compiler-warnings],
[enable_warn="$enableval"],
[enable_warn="error"]
)
if test "$enable_warn" != "no"; then
AX_CFLAGS_WARN_ALL
# AX_CFLAGS_WARN_ALL does not give good warning flags for the Intel compiler
# We will do this by hand instead
case "$ax_cv_c_compiler_vendor" in
gnu | clang)
CFLAGS="$CFLAGS -Wall"
;;
intel )
CFLAGS="$CFLAGS -w2"
;;
esac
# Add a "choke on warning" flag if it exists
if test "$enable_warn" = "error"; then
case "$ax_cv_c_compiler_vendor" in
intel | gnu )
intel | gnu
| clang
)
CFLAGS="$CFLAGS -Werror"
;;
esac
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment