From 9b637237bd7fffd559625fa04285ea5bb3aac426 Mon Sep 17 00:00:00 2001 From: Joel Anderson Date: Tue, 23 Oct 2018 20:28:43 -0400 Subject: add documentation of manual c++11 specification Per #1883, builds of Google Test may fail if the version C++ is not manually set to C++11 during the build process. Signed-off-by: Joel Anderson --- googletest/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/googletest/README.md b/googletest/README.md index 713cb673..133f6859 100644 --- a/googletest/README.md +++ b/googletest/README.md @@ -192,6 +192,15 @@ Google Test already has a CMake option for this: `gtest_force_shared_crt` Enabling this option will make gtest link the runtimes dynamically too, and match the project in which it is included. +#### C++ Standard Version + +An environment that supports C++11 is required in order to successfully build +Google Test. One way to ensure this is to specify the standard in the top-level +project, for example by using the `set(CMAKE_CXX_STANDARD 11)` command. If this +is not feasible, for example in a C project using Google Test for validation, +then it can be specified by adding it to the options for cmake via the +`DCMAKE_CXX_FLAGS` option. + ### Legacy Build Scripts Before settling on CMake, we have been providing hand-maintained build -- cgit v1.2.3