You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by dm...@apache.org on 2014/08/29 18:35:25 UTC
[1/2] git commit: require some c++11 features for libprocess
Repository: mesos
Updated Branches:
refs/heads/master e28858eb5 -> 9870284a9
require some c++11 features for libprocess
Review: https://reviews.apache.org/r/25168
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/b7c72139
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/b7c72139
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/b7c72139
Branch: refs/heads/master
Commit: b7c7213937179ea1c56b76f1b2c65c0e4a649602
Parents: e28858e
Author: Dominic Hamon <dh...@twitter.com>
Authored: Thu Aug 28 15:26:18 2014 -0700
Committer: Dominic Hamon <dh...@twitter.com>
Committed: Fri Aug 29 09:33:45 2014 -0700
----------------------------------------------------------------------
3rdparty/libprocess/configure.ac | 56 +++++++++++++----------------------
1 file changed, 21 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/b7c72139/3rdparty/libprocess/configure.ac
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/configure.ac b/3rdparty/libprocess/configure.ac
index 408b0db..2d13f2a 100644
--- a/3rdparty/libprocess/configure.ac
+++ b/3rdparty/libprocess/configure.ac
@@ -127,11 +127,6 @@ AC_ARG_WITH([zlib],
will be far less responsive; not recommended]),
[], [with_zlib=yes])
-AC_ARG_WITH([cxx11],
- AS_HELP_STRING([--without-cxx11],
- [builds libprocess without C++11 support (deprecated)]),
- [], [with_cxx11=yes])
-
# There is no prefix installation of the JAR.
AC_ARG_VAR([PROTOBUF_JAR], [full path to protobuf jar on prefixed builds])
@@ -480,14 +475,7 @@ AC_LANG_POP([C++])
AC_MSG_RESULT([$CLANG])
AC_SUBST([CLANG])
-# Force enable C++11 if compiling with clang.
-# Force disable C++11 if compiling with g++-4.7.
-if test "x$CLANG" = "xyes"; then
- if test "x$with_cxx11" != "xyes"; then
- AC_MSG_WARN([Force enabling C++11 for Clang build])
- fi
- with_cxx11=yes
-else
+if test "x$CLANG" = "xno"; then
# Check the version of gcc and add any flags as appropriate. Note
# that '-dumpversion' works for clang as well but as of clang 3.3 it
# reports version 4.2.1 (for gcc backwards compatibility).
@@ -508,15 +496,14 @@ else
CXXFLAGS="${CXXFLAGS} -Wno-unused-local-typedefs"
fi
- # Check for GCC version == 4.7 and disable C++11. The C++11 version
+ # Check for GCC version == 4.7 and fatal. The C++11 version
# of libprocess' Future uses features that 4.7 doesn't support. The
# non-C++11 version of libprocess' Future uses std::tr1 code that is
- # only available without-cxx11.
+ # only available in non-C++11 builds.
AX_COMPARE_VERSION([$GCC_VERSION], [eq2], [4.7],
[is_gxx47=yes], [is_gxx47=no])
if test "x$is_gxx47" = "xyes"; then
- AC_MSG_WARN([Force disabling C++11 for g++-4.7 build])
- with_cxx11=no
+ AC_MSG_ERROR([Unable to build with g++-4.7 due to a std::tr1 and C++11 mismatch])
fi
fi
@@ -541,27 +528,26 @@ you can get away without it by doing --without-zlib.
fi
-# Check if we should/can build with C++11.
-if test "x$with_cxx11" = "xyes"; then
- AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
+# Ensure we can build the C++11 features we expect, and set the std
+# CXXFLAG as appropriate.
+AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
- case "$host_os" in
- darwin* )
- # If we're using clang, we need to pass -stdlib=libc++ too.
- if test "x$CLANG" = "xyes"; then
- CXXFLAGS="$CXXFLAGS -stdlib=libc++"
- fi
+case "$host_os" in
+darwin* )
+ # If we're using clang, we need to pass -stdlib=libc++ too.
+ if test "x$CLANG" = "xyes"; then
+ CXXFLAGS="$CXXFLAGS -stdlib=libc++"
+ fi
- # GTEST on OSX needs its own tr1 tuple.
- # TODO(dhamon): Update to gmock 1.7 and pass GTEST_LANG_CXX11 when in
- # c++11 mode.
- CXXFLAGS="$CXXFLAGS -DGTEST_USE_OWN_TR1_TUPLE=1"
- ;;
- esac
+ # GTEST on OSX needs its own tr1 tuple.
+ # TODO(dhamon): Update to gmock 1.7 and pass GTEST_LANG_CXX11 when in
+ # c++11 mode.
+ CXXFLAGS="$CXXFLAGS -DGTEST_USE_OWN_TR1_TUPLE=1"
+ ;;
+esac
- # Also pass the flags to 3rdparty libraries.
- CONFIGURE_ARGS="$CONFIGURE_ARGS CXXFLAGS='$CXXFLAGS'"
-fi
+# Also pass the flags to 3rdparty libraries.
+CONFIGURE_ARGS="$CONFIGURE_ARGS CXXFLAGS='$CXXFLAGS'"
AC_CHECK_LIB([dl], [dlopen], [AC_MSG_RESULT([found])],
[AC_MSG_ERROR([cannot find libdl
[2/2] git commit: require some c++11 features for mesos
Posted by dm...@apache.org.
require some c++11 features for mesos
Review: https://reviews.apache.org/r/25169
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9870284a
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9870284a
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9870284a
Branch: refs/heads/master
Commit: 9870284a9673eafe6bb65fe60e5401dd6b827c6e
Parents: b7c7213
Author: Dominic Hamon <dh...@twitter.com>
Authored: Thu Aug 28 15:26:34 2014 -0700
Committer: Dominic Hamon <dh...@twitter.com>
Committed: Fri Aug 29 09:33:57 2014 -0700
----------------------------------------------------------------------
configure.ac | 56 +++++++++++++++++++++----------------------------------
1 file changed, 21 insertions(+), 35 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/9870284a/configure.ac
----------------------------------------------------------------------
diff --git a/configure.ac b/configure.ac
index 4b34173..c4b4391 100644
--- a/configure.ac
+++ b/configure.ac
@@ -201,11 +201,6 @@ AC_ARG_ENABLE([bundled-distribute],
in PYTHONPATH]),
[without_bundled_distribute=yes], [])
-AC_ARG_WITH([cxx11],
- AS_HELP_STRING([--without-cxx11],
- [builds Mesos without C++11 support (deprecated)]),
- [], [with_cxx11=yes])
-
AC_ARG_WITH([network-isolator],
AS_HELP_STRING([--with-network-isolator],
[builds the network isolator]),
@@ -489,14 +484,7 @@ AC_LANG_POP([C++])
AC_MSG_RESULT([$CLANG])
AC_SUBST([CLANG])
-# Force enable C++11 if compiling with clang.
-# Force disable C++11 if compiling with g++-4.7.
-if test "x$CLANG" = "xyes"; then
- if test "x$with_cxx11" != "xyes"; then
- AC_MSG_WARN([Force enabling C++11 for Clang build])
- fi
- with_cxx11=yes
-else
+if test "x$CLANG" = "xno"; then
# Check the version of gcc and add any flags as appropriate. Note
# that '-dumpversion' works for clang as well but as of clang 3.3 it
# reports version 4.2.1 (for gcc backwards compatibility).
@@ -528,40 +516,38 @@ else
CXXFLAGS="${CXXFLAGS} -Wno-unused-local-typedefs"
fi
- # Check for GCC version == 4.7 and disable C++11. The C++11 version
+ # Check for GCC version == 4.7 and fatal. The C++11 version
# of libprocess' Future uses features that 4.7 doesn't support. The
# non-C++11 version of libprocess' Future uses std::tr1 code that is
- # only available without-cxx11.
+ # only available in non-C++11 builds.
AX_COMPARE_VERSION([$GCC_VERSION], [eq2], [4.7],
[is_gxx47=yes], [is_gxx47=no])
if test "x$is_gxx47" = "xyes"; then
- AC_MSG_WARN([Force disabling C++11 for g++-4.7 build])
- with_cxx11=no
+ AC_MSG_ERROR([Unable to build with g++-4.7 due to std::tr1 and C++11 mismatches])
fi
fi
-# Check if we should/can build with C++11.
-if test "x$with_cxx11" = "xyes"; then
- AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
+# Ensure we can build the C++11 features we expect, and set the std
+# CXXFLAG as appropriate.
+AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
- case "$host_os" in
- darwin* )
- # If we're using clang, we need to pass -stdlib=libc++ too.
- if test "x$CLANG" = "xyes"; then
- CXXFLAGS="$CXXFLAGS -stdlib=libc++"
- fi
+case "$host_os" in
+darwin* )
+ # If we're using clang, we need to pass -stdlib=libc++ too.
+ if test "x$CLANG" = "xyes"; then
+ CXXFLAGS="$CXXFLAGS -stdlib=libc++"
+ fi
- # GTEST on OSX needs its own tr1 tuple.
- # TODO(dhamon): Update to gmock 1.7 and pass GTEST_LANG_CXX11 when in
- # c++11 mode.
- CXXFLAGS="$CXXFLAGS -DGTEST_USE_OWN_TR1_TUPLE=1"
- ;;
- esac
+ # GTEST on OSX needs its own tr1 tuple.
+ # TODO(dhamon): Update to gmock 1.7 and pass GTEST_LANG_CXX11 when in
+ # c++11 mode.
+ CXXFLAGS="$CXXFLAGS -DGTEST_USE_OWN_TR1_TUPLE=1"
+ ;;
+esac
- # Also pass the flags to 3rdparty libraries.
- CONFIGURE_ARGS="$CONFIGURE_ARGS CXXFLAGS='$CXXFLAGS'"
-fi
+# Also pass the flags to 3rdparty libraries.
+CONFIGURE_ARGS="$CONFIGURE_ARGS CXXFLAGS='$CXXFLAGS'"
# Check for pthreads (uses m4/acx_pthread.m4).