From the CMake 3.27 release notes:
Compatibility with versions of CMake older than 3.5 is now
deprecated and will be removed from a future version. Calls to
cmake_minimum_required() or cmake_policy() that set the policy
version to an older value now issue a deprecation diagnostic.
This PR also removes manually setting policy CMP0048. This is
redundant since the CMake min is already 3.X
Note that this is 1.12.1 as there will be a patch release to fix this
PiperOrigin-RevId: 458216994
Change-Id: Ibca52a8db22ed06cb1a1adc4832be67fce69459a
Bump `cmake_minimum_required` to 3.5.
Delete conditional branches exclusive to older versions.
Notable dependents:
- github.com/grpc/grpc >= 3.5.1
- github.com/abseil/abseil-cpp >= 3.5
- github.com/googleapis/google-cloud-cpp >= 3.5
On the other hand, github.com/protocolbuffers/protobuf is >= 3.1.3, but it only depends on GoogleTest 1.10.
Fixes#3523
PiperOrigin-RevId: 392073834
Remove the CMAKE_CXX_STANDARD from GoogleTest's CMakeLists.txt
This causes ABI issues since it can create a mixed-mode build. The
value should be inherited from the top-level build if it needs to be
set.
PiperOrigin-RevId: 294730724
I _think_ this represents some of the "best practices" for exporting
targets. They'll be available in a `googletest::` namespace (e.g.
`googletest::gmock`) with non-namespaced `ALIAS` targets.
- Added GOOGLETEST_VERSION variable
- Use `CMakePackageConfigHelpers`, bump minimum CMake version to 2.8.8
Signed-off-by: Dakota Hawkins <dakotahawkins@gmail.com>
Fix a bug deciding whether to enable the option to install Google Test
caused by one of the dependent option dependencies not being defined
yet.
Fixes#1198; impossible to install Google Test if Google Mock is built.
Modify library install destinations to install .dll's to the correct
location (`bin`, not `lib`), and to install other artifacts to the
correct platform-dependent location by using GNUInstallDirs. This is
required for some distributions (e.g. Fedora) and will fix an issue that
otherwise requires those distributions to patch the upstream sources.
Also, add options to suppress installation, which may be useful for
projects that embed Google Test.
Since Google Test is trying to support archaic versions of CMake, a
brain-dead fallback (which requires that the user set either LIB_SUFFIX
or CMAKE_INSTALL_LIBDIR themselves) is included for versions that
predate GNUInstallDirs.
Fixes#1161.
Co-Authored-By: d3x0r <d3x0r@users.noreply.github.com>