76 Commits

Author SHA1 Message Date
Derek Mauro
ff233bdd4c Update main to point to 1.15.2 patch release
PiperOrigin-RevId: 658382055
Change-Id: Ia5eed4bec26da8c8cbe29fbd3a41b44048c25e07
2024-08-01 06:34:56 -07:00
Derek Mauro
b62593aceb Update main branch to reflect the release of 1.15.0
PiperOrigin-RevId: 652824317
Change-Id: I39085d9451405c3decb462a0b4682added365d17
2024-07-16 06:57:43 -07:00
Tamas Kenez
48b373f6e0 Allow using external absl and re2. 2023-12-01 23:09:53 +01:00
Dzmitry Ivaniuk
2d09ed35cf cmake: Fix comments in cmake files
Remove extra spaces. Fix so that the comment line starts with a capital letter and ends with a dot.
2023-09-29 17:26:23 +03:00
Derek Mauro
f8d7d77c06 Bump version to v1.14 in preparation for release
PiperOrigin-RevId: 553152072
Change-Id: I0bfbb2da6b3902fc3e41a8e1c4aacb291ffdd098
2023-08-02 08:24:53 -07:00
Juan Ramos
efd8db1627 cmake: Clean up policy code
Now that the min is 3.13 these policies don't need to be set
manually anymore.

CMP0054 - 3.1
CMP0063 - 3.3
CMP0069 - 3.9
CMP0077 - 3.13
2023-06-20 13:03:00 -06:00
Copybara-Service
29836977ef Merge pull request #4288 from juan-lunarg:juan/cmake_min_3_dot_6
PiperOrigin-RevId: 541929012
Change-Id: I90423820611c2b6a6f81fe3f9ec2d23992ffbed1
2023-06-20 08:20:43 -07:00
Juan Ramos
4fed5f2850 cmake: Raise min to 3.6
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
2023-06-19 11:21:44 -06:00
Derek Mauro
b796f7d446 Bump version to 1.13.0 in preparation for release
PiperOrigin-RevId: 502626077
Change-Id: I3aad27a8b725cf73163e52ef2e28e6cdfc13082b
2023-01-17 10:36:43 -08:00
Abseil Team
6bad847991 CMake: Add GTEST_HAS_ABSL build option for using Absl
PiperOrigin-RevId: 482101793
Change-Id: I1bd140fd6a325f573c8a0c464e4dccd4acd0d0a3
2022-10-18 21:40:24 -07:00
Copybara-Service
760acf30e3 Merge pull request #3921 from Krzmbrzl:patch-1
PiperOrigin-RevId: 461660066
Change-Id: Ie23e046caf24d350c91e4ee3c4baf512780c6984
2022-07-18 10:48:58 -07:00
Robert Adam
2d1cd6ee27 Set cmake policy CMP0069
This ensures that LTO works as expected whenever the main project
has it enabled.
2022-07-18 07:36:40 +02:00
Derek Mauro
219af0d535 Update version number in CMakeLists.txt
Note that this is 1.12.1 as there will be a patch release to fix this

PiperOrigin-RevId: 458216994
Change-Id: Ibca52a8db22ed06cb1a1adc4832be67fce69459a
2022-06-30 07:10:22 -07:00
Joris van der Pol
91461509de
Set CMake Policy CMP0077 to NEW 2022-01-05 11:07:50 +01:00
Abseil Team
6204633979 Googletest export
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
2021-08-24 12:28:58 -04:00
Abseil Team
e2239ee604 Googletest export
Release GoogleTest 1.11.0

PiperOrigin-RevId: 378861756
2021-06-11 10:42:26 -07:00
Chuck Atkins
32f4f52d95 Bump CMake minimum to 2.8.12 2020-10-30 11:31:54 -04:00
Mark Jan van Kampen
ee01491229
Merge branch 'master' of https://github.com/google/googletest into cmake-QNX-fix
# Conflicts:
#	CMakeLists.txt
2020-04-16 14:26:44 +02:00
Abseil Team
227faf41db Googletest export
Fix Compilation against CMake < 3.7 (Fix #2711)

`VERSION_GREATER_EQUAL` was introduced in CMake 3.7
ref: https://cmake.org/cmake/help/v3.7/release/3.7.html#commands
PiperOrigin-RevId: 300817917
2020-03-17 17:20:31 -04:00
Mark Jan van Kampen
937b3ce9f7
Merge branch 'master' of https://github.com/google/googletest into cmake-QNX-fix
# Conflicts:
#	CMakeLists.txt
2020-02-17 09:41:49 +01:00
Abseil Team
23b2a3b1cf Googletest export
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
2020-02-13 13:52:14 -05:00
Mark Jan van Kampen
44517f9888
Fixes extensions missing for QNX 2020-01-22 22:29:28 +01:00
Ilya Kravchuk
20b8e7a1c8 Activate GNU extensions in case of MSYS generator 2019-12-13 13:47:04 +03:00
Abseil Team
703bd9caab Googletest export
Release Googletest 1.10

PiperOrigin-RevId: 272658347
2019-10-03 10:52:15 -04:00
Matthijs Brobbel
97d8c47df9
Suppress CMake policy warning (CMP0048)
As suggested in #2150.
2019-05-28 11:06:26 +02:00
Enji Cooper
699943fe40 Fix typo introduced in 63be3dcc245 (maintaners -> maintainers)
Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
2019-05-19 23:31:04 -07:00
misterg
63be3dcc24 Googletest export
Clarify build system support - CMake and automake community supported

PiperOrigin-RevId: 245821927
2019-05-03 15:11:22 -04:00
Matthias Grob
f89253434f cmake: detect Cygwin which needs extensions to build 2019-02-04 20:03:46 +01:00
Matthias Grob
67265e0706 cmake: move global project definition to beginning
such that necessary cmake variables to detect Cygwin are defined
when setting the C++ standard and we can distinguish.
2019-02-04 20:03:46 +01:00
peter
478a518590
Disable extensions and force standard 2018-10-24 12:17:06 +08:00
peter
96824f11c6
Fix -std=c++11 flag 2018-10-24 12:03:07 +08:00
Eisoku Kuroiwa
a31d6f9057 Merge c1170881039e859738c62b02a918116fc6d346bc into 27c86f29417e53a622a2902baab2d1d82dafc5f9
Closes #1888

PiperOrigin-RevId: 216244924
2018-10-08 17:07:13 -04:00
Gennadiy Civil
e93da23920 Merge 68b8a4c60cd80c78e1875b77807fa13cdd2313f8 into 77962730563eece3525f40b8769e4ca0c6baf64c
Closes #1880

PiperOrigin-RevId: 215429534
2018-10-02 14:52:38 -04:00
Jerry Turcios
cba3474435 Add a cached variable to CMAKE_CXX_STANDARD 2018-09-30 12:27:05 -04:00
Jerry Turcios
d97dea39b9 Add C++11 support in the root CMakeLists.txt 2018-09-28 14:55:43 -04:00
Stefano Soffia
aff0379441 Install CMake export files
Rework of the closed pull request #768
2018-08-22 17:27:11 +02:00
Dakota Hawkins
759ef7c4e9
Improve CMake exported targets.
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>
2018-08-21 13:02:09 -04:00
Matthew Woehlke
9469fb687d Fix problem installing gtest when gmock enabled
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.
2017-08-16 10:49:06 -04:00
Gennadiy Civil
e3bd4cbeae Merge pull request #1160 from mwoehlke-kitware/honor-lib_suffix
Fix library install destinations
2017-08-11 09:14:49 -04:00
Matthew Woehlke
0e8e0e07d6 Fix library install destinations
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>
2017-08-09 15:29:36 -04:00
Joel Laity
568958e940 Fixed cmake policy issue 2017-08-03 15:50:45 +12:00
Manuel VIVES
b68f1e769c Fix policy issue with old cmakes
#1169
2017-08-02 21:03:13 -04:00
Gennadiy Civil
683fcf5969 Merge pull request #782 from Manozco/709-cmake-policy-project-version
Issue 709: Fix Cmake policy 0048
2017-08-02 17:06:45 -04:00
Craig Scott
c0059a79f8 2.6.4 is the minimum CMake version, so enforce it (#656) 2016-12-17 19:15:04 -05:00
Manuel Vives
a7ab054f2b Issue 709: Fix Cmake policy 0048 2016-05-21 20:18:32 -04:00
Fábio Junqueira
4a0b77ff72 Create CMakeLists.txt
Adding functionality to build googletest from the root directory
2015-11-11 18:29:41 -02:00
Billy Donahue
1f87a0970d Move everything in googletest into googletest/googletest 2015-08-25 16:18:00 -04:00
kosak
7d1051ce2b Make Google Test build cleanly on Visual Studio 2010, 2012, 2013.
Also improve an error message in gtest_test_utils.py.
2014-01-13 22:24:15 +00:00
zhanyong.wan
c306ef2e14 supports a protocol for catching tests that prematurely exit 2013-09-06 22:50:25 +00:00
zhanyong.wan
9ba29fae92 fixes a typo in CMake script; h/t to Jay Mueller for reporting the issue 2013-07-09 04:45:37 +00:00