diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2015-12-18 15:16:07 -0800 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2015-12-21 00:28:37 -0800 |
commit | 1e2fece3e01b8e079b4f6930306377a9332a2ddb (patch) | |
tree | c6696e6c8c609cf71b71a2d6b5f64017e75b2c26 | |
parent | a0cecfd31a091ba6b95f4dfffe191c0aa033a54f (diff) | |
download | protobuf-1e2fece3e01b8e079b4f6930306377a9332a2ddb.tar.gz protobuf-1e2fece3e01b8e079b4f6930306377a9332a2ddb.tar.bz2 protobuf-1e2fece3e01b8e079b4f6930306377a9332a2ddb.zip |
Configure conformance tests to build with C++11 (require GCC 4.8)
[skip ci]
-rw-r--r-- | conformance/Makefile.am | 1 | ||||
-rwxr-xr-x | travis.sh | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/conformance/Makefile.am b/conformance/Makefile.am index 3c973408..c3551a45 100644 --- a/conformance/Makefile.am +++ b/conformance/Makefile.am @@ -21,6 +21,7 @@ conformance_test_runner_SOURCES = conformance_test.cc conformance_test_runner.cc third_party/jsoncpp/jsoncpp.cpp nodist_conformance_test_runner_SOURCES = conformance.pb.cc conformance_test_runner_CPPFLAGS = -I$(top_srcdir)/src -I$(srcdir) +conformance_test_runner_CXXFLAGS = -std=c++11 # Explicit deps beacuse BUILT_SOURCES are only done before a "make all/check" # so a direct "make test_cpp" could fail if parallel enough. conformance_test_runner-conformance_test.$(OBJEXT): conformance.pb.h @@ -11,6 +11,13 @@ # For when some other test needs the C++ main build, including protoc and # libprotobuf. internal_build_cpp() { + # Install GCC 4.8 to replace the default GCC 4.6. We need 4.8 for more + # decent C++ 11 support in order to compile conformance tests. + sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y + sudo apt-get update -qq + sudo apt-get install -qq g++-4.8 + export CXX="g++-4.8" CC="gcc-4.8" + ./autogen.sh ./configure make -j2 |