Commit Graph

36 Commits

Author SHA1 Message Date
Adam Badura
6dbddd32b0 Use -Wa,-mbig-obj for Cygwin/MinGW always 2019-08-11 21:10:06 +02:00
Adam Badura
1be5ce0907 Correct CMake to cover Cygwin 2019-07-27 22:25:32 +02:00
Enji Cooper
699943fe40 Fix typo introduced in 63be3dcc24 (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
Enji Cooper
9b6de41b5d Prefix googletest binaries under its own subtree instead of gtest
Building all test binaries under their respective subtrees makes
building the project via cmake easier to grok without additional hacks.
In particular, when dealing with the conversion I proposed in
https://reviews.freebsd.org/D19430 (switching from autotools to cmake),
I ran into unexpected gtest prefixing under the googlemock directory, as
opposed to the googletest directory. Example:

Before: `googlemock/gtest/googletest-break-on-failure-unittest_`
After:  `googletest/googletest-break-on-failure-unittest_`

The latter form is easier to translate to packaging manifests when
building googlemock is disabled, as well as enabled, as the path remains
consistent when the feature flag is disabled.

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
2019-03-29 15:00:05 -07:00
Abseil Team
216c37f057 Googletest export
Drop generated file gmock-generated-internal-utils.h.

PiperOrigin-RevId: 228232195
2019-01-08 11:50:56 -05:00
Abseil Team
c5f08bf919 Googletest export
One macro to rule them all.

PiperOrigin-RevId: 221462515
2018-11-15 16:11:19 -05:00
Abseil Team
7d3b73c85a Unconditionally use std::tuple.
Remove all mention of TR1 tuple and our own implementation of tuple.

PiperOrigin-RevId: 216395043
2018-10-09 16:25:58 -04:00
Matthieu
f5260ae757 Merge c798e39a4f into e93da23920
Closes #1836

PiperOrigin-RevId: 215461025
2018-10-02 17:41:16 -04:00
Matthieu Longo
0a18c106ac [msys] pass big object file option to assembler for target gmock-matchers_test 2018-09-18 18:28:29 +02:00
Dakota Hawkins
b19292e6b6
Use $<INSTALL_PREFIX> in target_include_directories
To make sure packages are relocatable, use `$<INSTALL_PREFIX>` in
`$<INSTALL_INTERFACE:...>` `target_include_directories`.

`$<INSTALL_PREFIX>` was introduced in CMake 2.8.11, which is already
being checked for locally.

References:

- https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html#id19
- https://github.com/robotology/how-to-export-cpp-library/blob/claudio/headeronly/src/LibTemplateCMake/CMakeLists.txt#L42

Signed-off-by: Dakota Hawkins <dakotahawkins@gmail.com>
2018-08-24 16:51:55 -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
Gennadiy Civil
1246e5807a
Merge branch 'master' into cleanup-cmake 2018-08-15 13:02:54 -07:00
Elias Daler
9ca399ae05 Change location of generated pkg-config files from CMAKE_BINARY_DIR to gmock/gtest_BINARY_DIR (#1717) 2018-08-13 23:01:09 +03:00
Henry Fredrick Schreiner
b22e8dec40 Clean up cache non-advanced variable for subproject 2018-04-05 13:40:26 +02:00
Gennadiy Civil
0e6da4cead
Merge branch 'master' into fix-core-dump-shared 2018-01-09 00:22:32 -05:00
Bryan Zimmerman
74a5306313 remove extra line 2017-12-11 12:21:35 -05:00
bryanzim
f98c20baa8
Merge branch 'master' into master 2017-12-11 09:37:55 -05:00
Gennadiy Civil
10ef1d9a1e
Merge branch 'master' into use-system-includes 2017-12-08 15:11:13 -05:00
bryanzim
4aae1600d0
Merge branch 'master' into master 2017-12-08 11:31:31 -05:00
Gennadiy Civil
cdedd189b2
Merge branch 'master' into fix-core-dump-shared 2017-12-08 11:12:19 -05:00
Wojciech Mamrak
3464f76e89
Improved description of VS std::tuple support 2017-12-07 18:18:17 +01:00
Romain Geissler
0663ce9024 Fix double free when building Gtest/GMock in shared libraries and linking a test executable with both. 2017-12-02 22:47:20 +01:00
Sam Lunt
f46bd00e36 make includes system 2017-11-27 17:31:07 -06:00
Bryan Zimmerman
1ae4096b9c fix for VS2017 deprecation of ::tr1::tuple
change static_cast to ImplicitCast_ for consitency
fixes for building with path names containing spaces
2017-10-27 14:01:16 -04:00
Roman Lebedev
1a62d1b088
CMake: use threads if allowed and found, not just if found.
If the user's cmakelists.txt first look for threads using
find_package(Threads), then set(gtest_disable_pthreads ON),
and then include googletest. GoogleTest will not look for
threads. But since they have already been found before in
user's cmakelists, it will use them regardless.

This helped me fix build issue in darktable-org/rawspeed
on windows/MSYS2, even though there are threads, and they
are usable, googletest build was failing with issues
about AutoHandle. I was first looking for threads, and only
then including googletest, so no matter the value of
gtest_disable_pthreads, it failed.

The other obvious solution is for user to first include
googletest, and only then look for threads by himself.
2017-09-01 21:02:59 +03:00
David Seifert
8604c4adac Add support for pkgconfig 2017-08-14 13:45:56 +02: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
Craig Scott
c0059a79f8 2.6.4 is the minimum CMake version, so enforce it (#656) 2016-12-17 19:15:04 -05:00
Billy Donahue
0162ff72e8 Merge pull request #657 from audiofanatic/issue655-targetHeaderDeps
Add include dirs to targets if CMake version supports it
2015-12-10 17:28:00 -05:00
Craig Scott
f601ee162e Add include dirs to targets if CMake version supports it 2015-12-06 16:31:21 +11:00
Joan Puigcerver
7c8ac4886a Added CMake install rules for GMock 2015-12-03 09:33:21 +01:00
Arnaud Lacombe
eff38a7a0f googlemock: fix unified build 2015-08-26 21:50:38 -07:00
Billy Donahue
affb09edf0 move googlemock files into googlemock/ subdir 2015-08-25 17:47:18 -04:00