Commit Graph

40 Commits

Author SHA1 Message Date
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
zhanyong.wan
88fe90793c Removes dangling references in make/cmake files. 2013-02-27 18:51:27 +00:00
kosak
cc1fdb58ca Removes testing::internal::String::Format(), which causes problems as it truncates the result at 4096 chars. Also update an obsolete link in comment. 2013-02-22 20:10:40 +00:00
vladlosev
cc265df8b4 Fixes broken build on VC++ 7.1. 2011-06-13 19:00:37 +00:00
vladlosev
50f4deb1cf Modifies handling of C++ exceptions in death tests to treat exceptions escaping them as failures. 2010-10-18 22:09:55 +00:00
zhanyong.wan
9c48242258 Adds a gtest_disable_pthreads CMake option; also fixes an include order problem in the cmake script. 2010-10-05 19:22:50 +00:00
zhanyong.wan
5c4b472bbf Makes gtest print enums as integers instead of hex dumps (by Zhanyong Wan); improves the hex dump format (by Zhanyong Wan); gets rid of class TestInfoImpl (by Zhanyong Wan); adds exception handling (by Vlad Losev). 2010-08-09 18:19:15 +00:00
vladlosev
c828e17175 Introduces gtest_force_shared_crt option for CMake build scripts. 2010-05-18 21:08:05 +00:00
vladlosev
2c697f5919 Comment tweaks in CMakeLists.txt. 2010-05-13 18:02:27 +00:00
vladlosev
e588a3bba2 Renames CMake build script options. 2010-05-11 09:37:33 +00:00
zhanyong.wan
2ccea88c99 Moves the universal printer from gmock to gtest and refactors the cmake script for reusing in gmock (by Vlad Losev). 2010-05-10 17:11:58 +00:00
vladlosev
c476707e82 Improves support for building Google Test as Windows DLL. 2010-05-05 13:09:35 +00:00
zhanyong.wan
520f623c59 Minor improvement to hermetic build support in the CMake script, by Vlad Losev. 2010-04-22 23:35:34 +00:00
vladlosev
1e908873eb CMake 2.8/Visual Age compatibility patch by Hady Zalek. 2010-04-05 20:50:36 +00:00
zhanyong.wan
3569c3c86d Fixes compatibility with Visual Age versions lower than 9.0 (by Hady Zalek); updates the release notes. 2010-03-26 05:35:42 +00:00
zhanyong.wan
2429dfc641 Cleans up the cmake script. 2010-03-25 23:12:35 +00:00
zhanyong.wan
92344b762a Makes the cmake script work on Solaris and AIX (by Hady Zalek). 2010-03-25 18:36:31 +00:00
zhanyong.wan
9f0824b0a6 Adds missing gtest DLL exports. 2010-03-22 21:23:51 +00:00
zhanyong.wan
a6978ecb4c Fixes a -Wextra warning in gtest-param-util.h and updates the cmake script to verify it (by Zhanyong Wan); adds support for hermetic build to the cmake script (by Vlad Losev). 2010-03-17 00:08:06 +00:00
zhanyong.wan
83589cca34 Supports building gtest as a DLL (by Vlad Losev). 2010-03-05 21:21:06 +00:00
vladlosev
fe78760959 Makes all samples compile with -Wall -Wshadow -Werror. 2010-02-27 08:21:11 +00:00
zhanyong.wan
3bef459eac Adds threading support (by Miklos Fazekas, Vlad Losev, and Chandler Carruth); adds wide InitGoogleTest to gtest.def (by Vlad Losev); updates the version number (by Zhanyong Wan); updates the release notes for 1.5.0 (by Vlad Losev); removes scons scripts from the distribution (by Zhanyong Wan); adds the cmake build script to the distribution (by Zhanyong Wan); adds fused source files to the distribution (by Vlad Losev and Chandler Carruth). 2010-02-24 17:19:25 +00:00
zhanyong.wan
81e1cc73c8 Introduces macro GTEST_HAS_STREAM_REDIRECTION_ (by Vlad Losev); fixes unsynchronized color text output on Windows (by Vlad Losev); fixes the cmake script to work with MSVC 10 (by Manuel Klimek). 2010-01-28 21:50:29 +00:00
zhanyong.wan
276f4019c0 Makes the cmake script work on Windows (by Manuel Klimek). 2010-01-06 18:04:55 +00:00
zhanyong.wan
c73d024193 Makes the cmake script compatible with cmake 2.6.4. 2010-01-05 18:27:41 +00:00
zhanyong.wan
38efa38f40 Uses FindThreads to set the proper link flag when using threads (by Manuel Klimek). 2010-01-05 16:30:02 +00:00
zhanyong.wan
1d6df4be08 Adds an experimental CMake build script; makes the samples compile without warnings on Windows. 2009-12-29 19:45:33 +00:00