1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00

Add --enable-werror and --enable-cxx11 to projects/sample/

llvm-svn: 167716
This commit is contained in:
Craig Topper 2012-11-12 06:11:12 +00:00
parent da9a98c364
commit 6f32cdabf0
3 changed files with 75 additions and 3 deletions

View File

@ -184,6 +184,12 @@ RDYNAMIC := @RDYNAMIC@
#ENABLE_LIBCPP = 0
ENABLE_LIBCPP = @ENABLE_LIBCPP@
# When ENABLE_CXX11 is enabled, LLVM uses c++11 mode by default to build.
ENABLE_CXX11 = @ENABLE_CXX11@
# When ENABLE_WERROR is enabled, we'll pass -Werror on the command line
ENABLE_WERROR = @ENABLE_WERROR@
# When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
# into the "Release" directories. Otherwise, LLVM code is not optimized and
# output is put in the "Debug" directories.

View File

@ -380,6 +380,18 @@ case "$enableval" in
*) AC_MSG_ERROR([Invalid setting for --enable-libcpp. Use "yes" or "no"]) ;;
esac
dnl --enable-cxx11 : check whether or not to use -std=c++11 on the command line
AC_ARG_ENABLE(cxx11,
AS_HELP_STRING([--enable-cxx11],
[Use c++11 if available (default is NO)]),,
enableval=default)
case "$enableval" in
yes) AC_SUBST(ENABLE_CXX11,[1]) ;;
no) AC_SUBST(ENABLE_CXX11,[0]) ;;
default) AC_SUBST(ENABLE_CXX11,[0]);;
*) AC_MSG_ERROR([Invalid setting for --enable-cxx11. Use "yes" or "no"]) ;;
esac
dnl --enable-optimized : check whether they want to do an optimized build:
AC_ARG_ENABLE(optimized, AS_HELP_STRING(
--enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize)
@ -407,6 +419,16 @@ else
AC_SUBST(DISABLE_ASSERTIONS,[[DISABLE_ASSERTIONS=1]])
fi
dnl --enable-werror : check whether we want Werror on by default
AC_ARG_ENABLE(werror,AS_HELP_STRING(
--enable-werror,[Compile with -Werror enabled (default is NO)]),, enableval="no")
case "$enableval" in
yes) AC_SUBST(ENABLE_WERROR,[1]) ;;
no) AC_SUBST(ENABLE_WERROR,[0]) ;;
default) AC_SUBST(ENABLE_WERROR,[0]);;
*) AC_MSG_ERROR([Invalid setting for --enable-werror. Use "yes" or "no"]) ;;
esac
dnl --enable-expensive-checks : check whether they want to turn on expensive debug checks:
AC_ARG_ENABLE(expensive-checks,AS_HELP_STRING(
--enable-expensive-checks,[Compile with expensive debug checks enabled (default is NO)]),, enableval="no")

View File

@ -683,9 +683,11 @@ BUILD_EXEEXT
BUILD_CXX
CVSBUILD
ENABLE_LIBCPP
ENABLE_CXX11
ENABLE_OPTIMIZED
ENABLE_PROFILING
DISABLE_ASSERTIONS
ENABLE_WERROR
ENABLE_EXPENSIVE_CHECKS
EXPENSIVE_CHECKS
DEBUG_RUNTIME
@ -1375,10 +1377,12 @@ Optional Features:
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-polly Use polly if available (default is YES)
--enable-libcpp Use libc++ if available (default is NO)
--enable-cxx11 Use c++11 if available (default is NO)
--enable-optimized Compile with optimizations enabled (default is NO)
--enable-profiling Compile with profiling enabled (default is NO)
--enable-assertions Compile with assertion checks enabled (default is
YES)
--enable-werror Compile with -Werror enabled (default is NO)
--enable-expensive-checks
Compile with expensive debug checks enabled (default
is NO)
@ -4942,6 +4946,25 @@ echo "$as_me: error: Invalid setting for --enable-libcpp. Use \"yes\" or \"no\""
{ (exit 1); exit 1; }; } ;;
esac
# Check whether --enable-cxx11 was given.
if test "${enable_cxx11+set}" = set; then
enableval=$enable_cxx11;
else
enableval=default
fi
case "$enableval" in
yes) ENABLE_CXX11=1
;;
no) ENABLE_CXX11=0
;;
default) ENABLE_CXX11=0
;;
*) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-cxx11. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-cxx11. Use \"yes\" or \"no\"" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
# Check whether --enable-optimized was given.
if test "${enable_optimized+set}" = set; then
enableval=$enable_optimized;
@ -4987,6 +5010,25 @@ else
fi
# Check whether --enable-werror was given.
if test "${enable_werror+set}" = set; then
enableval=$enable_werror;
else
enableval="no"
fi
case "$enableval" in
yes) ENABLE_WERROR=1
;;
no) ENABLE_WERROR=0
;;
default) ENABLE_WERROR=0
;;
*) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-werror. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-werror. Use \"yes\" or \"no\"" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
# Check whether --enable-expensive-checks was given.
if test "${enable_expensive_checks+set}" = set; then
enableval=$enable_expensive_checks;
@ -21641,9 +21683,11 @@ BUILD_EXEEXT!$BUILD_EXEEXT$ac_delim
BUILD_CXX!$BUILD_CXX$ac_delim
CVSBUILD!$CVSBUILD$ac_delim
ENABLE_LIBCPP!$ENABLE_LIBCPP$ac_delim
ENABLE_CXX11!$ENABLE_CXX11$ac_delim
ENABLE_OPTIMIZED!$ENABLE_OPTIMIZED$ac_delim
ENABLE_PROFILING!$ENABLE_PROFILING$ac_delim
DISABLE_ASSERTIONS!$DISABLE_ASSERTIONS$ac_delim
ENABLE_WERROR!$ENABLE_WERROR$ac_delim
ENABLE_EXPENSIVE_CHECKS!$ENABLE_EXPENSIVE_CHECKS$ac_delim
EXPENSIVE_CHECKS!$EXPENSIVE_CHECKS$ac_delim
DEBUG_RUNTIME!$DEBUG_RUNTIME$ac_delim
@ -21653,8 +21697,6 @@ TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim
ENABLE_DOCS!$ENABLE_DOCS$ac_delim
ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
ENABLE_THREADS!$ENABLE_THREADS$ac_delim
ENABLE_PTHREADS!$ENABLE_PTHREADS$ac_delim
ENABLE_PIC!$ENABLE_PIC$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@ -21696,6 +21738,8 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
ENABLE_PTHREADS!$ENABLE_PTHREADS$ac_delim
ENABLE_PIC!$ENABLE_PIC$ac_delim
ENABLE_SHARED!$ENABLE_SHARED$ac_delim
ENABLE_EMBED_STDCXX!$ENABLE_EMBED_STDCXX$ac_delim
ENABLE_TIMESTAMPS!$ENABLE_TIMESTAMPS$ac_delim
@ -21787,7 +21831,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5