Move googletest version variable into external CMake file and include in subsequent projects
Fixes #4309
This commit is contained in:
parent
33af80a883
commit
efc0464ff4
@ -4,7 +4,9 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
project(googletest-distribution)
|
||||
set(GOOGLETEST_VERSION 1.14.0)
|
||||
|
||||
# Import googletest version
|
||||
include(cmake/googletest-version.cmake)
|
||||
|
||||
if(NOT CYGWIN AND NOT MSYS AND NOT ${CMAKE_SYSTEM_NAME} STREQUAL QNX)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
1
cmake/googletest-version.cmake
Normal file
1
cmake/googletest-version.cmake
Normal file
@ -0,0 +1 @@
|
||||
set(GOOGLETEST_VERSION 1.14.0)
|
@ -8,6 +8,9 @@
|
||||
# ctest. You can select which tests to run using 'ctest -R regex'.
|
||||
# For more options, run 'ctest --help'.
|
||||
|
||||
# Import googletest version
|
||||
include(../cmake/googletest-version.cmake)
|
||||
|
||||
option(gmock_build_tests "Build all of Google Mock's own tests." OFF)
|
||||
|
||||
# A directory to find Google Test sources.
|
||||
|
@ -10,6 +10,10 @@
|
||||
|
||||
# When other libraries are using a shared version of runtime libraries,
|
||||
# Google Test also has to use one.
|
||||
|
||||
# Import googletest version
|
||||
include(../cmake/googletest-version.cmake)
|
||||
|
||||
option(
|
||||
gtest_force_shared_crt
|
||||
"Use shared (DLL) run-time lib even when Google Test is built as static lib."
|
||||
|
Loading…
Reference in New Issue
Block a user