Skip to content

Commit 95e6b70

Browse files
authored
Merge pull request #279 from ursfassler/googletest
No googletest auto-download
2 parents 4d47d6c + 4301045 commit 95e6b70

File tree

9 files changed

+19
-564
lines changed

9 files changed

+19
-564
lines changed

CMakeLists.txt

+2-9
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5)
1+
cmake_minimum_required(VERSION 3.9)
22

33
if(NOT CMAKE_VERSION VERSION_LESS "3.3")
44
# Don't ignore visibility related properties for non-SHARED targets
@@ -14,7 +14,6 @@ endif()
1414
project(Cucumber-Cpp)
1515

1616
option(BUILD_SHARED_LIBS "Generate shared libraries" OFF)
17-
option(CUKE_USE_STATIC_GTEST "Statically link Google Test" ON)
1817
option(CUKE_ENABLE_BOOST_TEST "Enable Boost.Test framework" ON)
1918
option(CUKE_ENABLE_EXAMPLES "Build examples" OFF)
2019
option(CUKE_ENABLE_GTEST "Enable Google Test framework" ON)
@@ -24,8 +23,6 @@ option(CUKE_CODE_COVERAGE "Enable instrumentation for code coverage" OFF)
2423
set(CUKE_ENABLE_SANITIZER "OFF" CACHE STRING "Sanitizer to use for checking")
2524
set_property(CACHE CUKE_ENABLE_SANITIZER PROPERTY STRINGS OFF "address" "thread" "undefined")
2625
option(CUKE_TESTS_VALGRIND "Enable tests within Valgrind" OFF)
27-
set(GMOCK_SRC_DIR "" CACHE STRING "Google Mock framework sources path (otherwise downloaded)")
28-
set(GMOCK_VER "1.11.0" CACHE STRING "Google Mock framework version to be used")
2926

3027
if(NOT DEFINED CMAKE_CXX_STANDARD)
3128
set(CMAKE_CXX_STANDARD 17)
@@ -122,11 +119,7 @@ endif()
122119
#
123120

124121
if(CUKE_ENABLE_GTEST)
125-
set(GTEST_USE_STATIC_LIBS ${CUKE_USE_STATIC_GTEST})
126-
if(NOT GMOCK_ROOT)
127-
set(GMOCK_ROOT "${CMAKE_CURRENT_BINARY_DIR}/gmock")
128-
endif()
129-
find_package(GMock REQUIRED)
122+
find_package(GTest 1.11.0)
130123
endif()
131124

132125
#

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,15 @@ If you want to contribute code to the project, guidelines are in [CONTRIBUTING.m
1717

1818
It relies on a few executables:
1919

20-
* [cmake](https://cmake.org/download/) 3.5 or later.
20+
* [cmake](https://cmake.org/download/) 3.9 or later.
2121
Required to setup environment and build software
2222

2323
It relies on a few libraries:
2424

2525
* [Asio](https://think-async.com/Asio/) 1.18.1 or later.
2626
* [Boost.Test](http://www.boost.org/) 1.70. Optional for the Boost Test driver.
27-
* [GTest](http://code.google.com/p/googletest/) 1.6 or later.
28-
Optional for the GTest driver. By default downloaded and built by CMake.
29-
* [GMock](http://code.google.com/p/googlemock/) 1.6 or later.
30-
Optional for the internal test suite. By default downloaded and built by CMake.
27+
* [GTest](https://github.com./google/googletest) 1.11.0 or later. Optional for the GTest driver.
28+
* [GMock](https://github.com./google/googletest) 1.11.0 or later. Optional for the internal test suite.
3129
* [nlohmann-json](https://github.com./nlohmann/json) 3.10.5 or later.
3230
* [Qt 4 or 5](http://qt-project.org/). Optional for the CalcQt example and QtTest driver (only Qt 5).
3331
* [TCLAP](https://tclap.sourceforge.net/) 1.2.5 or later.

0 commit comments

Comments
 (0)