summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore4
-rw-r--r--CMakeLists.txt6
-rw-r--r--docs/pkgconfig.md14
-rw-r--r--googlemock/CMakeLists.txt3
-rw-r--r--googletest/CMakeLists.txt3
-rw-r--r--googletest/README.md6
6 files changed, 15 insertions, 21 deletions
diff --git a/.gitignore b/.gitignore
index f08cb72..fede02f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,6 +24,10 @@ Win32-Release/
x64-Debug/
x64-Release/
+# VSCode files
+.cache/
+cmake-variants.yaml
+
# Ignore autoconf / automake files
Makefile.in
aclocal.m4
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6af4143..890e495 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,11 +1,7 @@
# Note: CMake support is community-based. The maintainers do not use CMake
# internally.
-cmake_minimum_required(VERSION 3.5)
-
-if (POLICY CMP0048)
- cmake_policy(SET CMP0048 NEW)
-endif (POLICY CMP0048)
+cmake_minimum_required(VERSION 3.13)
if (POLICY CMP0069)
cmake_policy(SET CMP0069 NEW)
diff --git a/docs/pkgconfig.md b/docs/pkgconfig.md
index 18a2546..bf05d59 100644
--- a/docs/pkgconfig.md
+++ b/docs/pkgconfig.md
@@ -19,19 +19,15 @@ examples here we assume you want to compile the sample
Using `pkg-config` in CMake is fairly easy:
```cmake
-cmake_minimum_required(VERSION 3.0)
-
-cmake_policy(SET CMP0048 NEW)
-project(my_gtest_pkgconfig VERSION 0.0.1 LANGUAGES CXX)
-
find_package(PkgConfig)
pkg_search_module(GTEST REQUIRED gtest_main)
-add_executable(testapp samples/sample3_unittest.cc)
-target_link_libraries(testapp ${GTEST_LDFLAGS})
-target_compile_options(testapp PUBLIC ${GTEST_CFLAGS})
+add_executable(testapp)
+target_sources(testapp PRIVATE samples/sample3_unittest.cc)
+target_link_libraries(testapp PRIVATE ${GTEST_LDFLAGS})
+target_compile_options(testapp PRIVATE ${GTEST_CFLAGS})
-include(CTest)
+enable_testing()
add_test(first_and_only_test testapp)
```
diff --git a/googlemock/CMakeLists.txt b/googlemock/CMakeLists.txt
index 5c1f0da..5833d20 100644
--- a/googlemock/CMakeLists.txt
+++ b/googlemock/CMakeLists.txt
@@ -36,8 +36,7 @@ endif()
# as ${gmock_SOURCE_DIR} and to the root binary directory as
# ${gmock_BINARY_DIR}.
# Language "C" is required for find_package(Threads).
-cmake_minimum_required(VERSION 3.5)
-cmake_policy(SET CMP0048 NEW)
+cmake_minimum_required(VERSION 3.13)
project(gmock VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
if (COMMAND set_up_hermetic_build)
diff --git a/googletest/CMakeLists.txt b/googletest/CMakeLists.txt
index d06c147..e76b8c8 100644
--- a/googletest/CMakeLists.txt
+++ b/googletest/CMakeLists.txt
@@ -46,8 +46,7 @@ endif()
# Project version:
-cmake_minimum_required(VERSION 3.5)
-cmake_policy(SET CMP0048 NEW)
+cmake_minimum_required(VERSION 3.13)
project(gtest VERSION ${GOOGLETEST_VERSION} LANGUAGES CXX C)
if (POLICY CMP0063) # Visibility
diff --git a/googletest/README.md b/googletest/README.md
index 4cad12f..6bbd7f8 100644
--- a/googletest/README.md
+++ b/googletest/README.md
@@ -124,10 +124,10 @@ match the project in which it is included.
#### C++ Standard Version
-An environment that supports C++11 is required in order to successfully build
+An environment that supports C++14 is required in order to successfully build
GoogleTest. 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 along
-with `set(CMAKE_CXX_STANDARD_REQUIRED ON). If this is not feasible, for example
+project, for example by using the `set(CMAKE_CXX_STANDARD 14)` command along
+with `set(CMAKE_CXX_STANDARD_REQUIRED ON)`. If this is not feasible, for example
in a C project using GoogleTest for validation, then it can be specified by
adding it to the options for cmake via the`-DCMAKE_CXX_FLAGS` option.