Remove support for C++11

v1.12.x is the last branch to support C++11
Future releases will require at least C++14

PiperOrigin-RevId: 458250106
Change-Id: Ibee2248649ff3c13daaa179135887848bf730f3f
This commit is contained in:
Derek Mauro 2022-06-30 09:53:12 -07:00 committed by Copybara-Service
parent 219af0d535
commit 96f51426e4
5 changed files with 15 additions and 11 deletions

View File

@ -15,11 +15,14 @@ Our documentation is now live on GitHub Pages at
https://google.github.io/googletest/. We recommend browsing the documentation on https://google.github.io/googletest/. We recommend browsing the documentation on
GitHub Pages rather than directly in the repository. GitHub Pages rather than directly in the repository.
#### Release 1.12.0 #### Release 1.12.1
[Release 1.12.0](https://github.com/google/googletest/releases/tag/release-1.12.0) [Release 1.12.1](https://github.com/google/googletest/releases/tag/release-1.12.1)
is now available. is now available.
The 1.12.x branch will be the last to support C++11. Future releases will
require at least C++14.
#### Coming Soon #### Coming Soon
* We are planning to take a dependency on * We are planning to take a dependency on
@ -56,7 +59,7 @@ More information about building GoogleTest can be found at
## Supported Platforms ## Supported Platforms
GoogleTest requires a codebase and compiler compliant with the C++11 standard or GoogleTest requires a codebase and compiler compliant with the C++14 standard or
newer. newer.
The GoogleTest code is officially supported on the following platforms. The GoogleTest code is officially supported on the following platforms.

View File

@ -39,7 +39,7 @@ if [[ -z ${GTEST_ROOT:-} ]]; then
fi fi
if [[ -z ${STD:-} ]]; then if [[ -z ${STD:-} ]]; then
STD="c++11 c++14 c++17 c++20" STD="c++14 c++17 c++20"
fi fi
# Test the CMake build # Test the CMake build
@ -55,7 +55,7 @@ for cc in /usr/local/bin/gcc /opt/llvm/clang/bin/clang; do
${LINUX_LATEST_CONTAINER} \ ${LINUX_LATEST_CONTAINER} \
/bin/bash -c " /bin/bash -c "
cmake /src \ cmake /src \
-DCMAKE_CXX_STANDARD=11 \ -DCMAKE_CXX_STANDARD=14 \
-Dgtest_build_samples=ON \ -Dgtest_build_samples=ON \
-Dgtest_build_tests=ON \ -Dgtest_build_tests=ON \
-Dgmock_build_tests=ON \ -Dgmock_build_tests=ON \

View File

@ -40,7 +40,7 @@ for cmake_off_on in OFF ON; do
BUILD_DIR=$(mktemp -d build_dir.XXXXXXXX) BUILD_DIR=$(mktemp -d build_dir.XXXXXXXX)
cd ${BUILD_DIR} cd ${BUILD_DIR}
time cmake ${GTEST_ROOT} \ time cmake ${GTEST_ROOT} \
-DCMAKE_CXX_STANDARD=11 \ -DCMAKE_CXX_STANDARD=14 \
-Dgtest_build_samples=ON \ -Dgtest_build_samples=ON \
-Dgtest_build_tests=ON \ -Dgtest_build_tests=ON \
-Dgmock_build_tests=ON \ -Dgmock_build_tests=ON \
@ -53,7 +53,7 @@ done
# Test the Bazel build # Test the Bazel build
# If we are running on Kokoro, check for a versioned Bazel binary. # If we are running on Kokoro, check for a versioned Bazel binary.
KOKORO_GFILE_BAZEL_BIN="bazel-3.7.0-darwin-x86_64" KOKORO_GFILE_BAZEL_BIN="bazel-5.1.1-darwin-x86_64"
if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f ${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN} ]]; then if [[ ${KOKORO_GFILE_DIR:-} ]] && [[ -f ${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN} ]]; then
BAZEL_BIN="${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN}" BAZEL_BIN="${KOKORO_GFILE_DIR}/${KOKORO_GFILE_BAZEL_BIN}"
chmod +x ${BAZEL_BIN} chmod +x ${BAZEL_BIN}
@ -66,6 +66,7 @@ for absl in 0 1; do
${BAZEL_BIN} test ... \ ${BAZEL_BIN} test ... \
--copt="-Wall" \ --copt="-Wall" \
--copt="-Werror" \ --copt="-Werror" \
--cxxopt="-std=c++14" \
--define="absl=${absl}" \ --define="absl=${absl}" \
--keep_going \ --keep_going \
--show_timestamps \ --show_timestamps \

View File

@ -9,7 +9,7 @@ we recommend this tutorial as a starting point.
To complete this tutorial, you'll need: To complete this tutorial, you'll need:
* A compatible operating system (e.g. Linux, macOS, Windows). * A compatible operating system (e.g. Linux, macOS, Windows).
* A compatible C++ compiler that supports at least C++11. * A compatible C++ compiler that supports at least C++14.
* [Bazel](https://bazel.build/), the preferred build system used by the * [Bazel](https://bazel.build/), the preferred build system used by the
GoogleTest team. GoogleTest team.

View File

@ -10,7 +10,7 @@ this tutorial as a starting point. If your project uses Bazel, see the
To complete this tutorial, you'll need: To complete this tutorial, you'll need:
* A compatible operating system (e.g. Linux, macOS, Windows). * A compatible operating system (e.g. Linux, macOS, Windows).
* A compatible C++ compiler that supports at least C++11. * A compatible C++ compiler that supports at least C++14.
* [CMake](https://cmake.org/) and a compatible build tool for building the * [CMake](https://cmake.org/) and a compatible build tool for building the
project. project.
* Compatible build tools include * Compatible build tools include
@ -52,8 +52,8 @@ To do this, in your project directory (`my_project`), create a file named
cmake_minimum_required(VERSION 3.14) cmake_minimum_required(VERSION 3.14)
project(my_project) project(my_project)
# GoogleTest requires at least C++11 # GoogleTest requires at least C++14
set(CMAKE_CXX_STANDARD 11) set(CMAKE_CXX_STANDARD 14)
include(FetchContent) include(FetchContent)
FetchContent_Declare( FetchContent_Declare(