aboutsummaryrefslogtreecommitdiffstats
path: root/googletest/cmake
Commit message (Collapse)AuthorAgeFilesLines
* Ensure that gtest/gmock pkgconfig requirements specify versionNeal Gompa2020-03-211-1/+1
| | | | | | | | | Google Test and Google Mock require matching versions to work, so this requirement should be described in the pkgconfig files. This change is derived from the one used for the Fedora gtest package. Signed-off-by: Neal Gompa <ngompa13@gmail.com>
* Merge pull request #2556 from ienorand:avoid-pkg-config-lpthread-cflagAndy Getz2019-11-132-2/+2
|\ | | | | | | PiperOrigin-RevId: 279375858
| * pkg-config: Remove pthread link flag from CflagsMartin Erik Werner2019-11-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Remove the threads link library variable references from the pkg-config Cflags: field, removing -lpthread(s) from the compile flags. "-l*" linker flags should only be part of the Libs: section and should not be part of the Cflags: section in pkg-config files. This was first suggested in https://github.com/google/googletest/pull/2006 and further discussed in https://github.com/google/googletest/pull/2483 .
* | Revert "Use pcfiledir for prefix in pkgconfig file"David Seifert2019-10-052-6/+4
|/ | | | | | | | The change makes implicit assumptions on the layout of the install tree, which is going to break in many ways. The correct solution is to use the `PKG_CONFIG_SYSROOT_DIR` variable to inject the cross-compiled sysroot into `-I` and `-L` paths.
* Setting CMP0054 policy to NEW. This allows to use the string "SHARED" ↵Matthias Walter2019-06-121-0/+4
| | | | without interpreting it as a variable.
* clang: fix `-Wsign-conversion` errorsEnji Cooper2019-04-051-1/+1
| | | | | | | | | | | Cast some values as their unsigned equivalents or `size_t` to match the parameter type used for the template object under test. Also, provide UInt32 equivalent delegate methods for some callers (with int-equivalents for backwards compatibility). This closes #2146. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* Merge pull request #2148 from ngie-eign:clang-add-explicit-c++11-rtti-flagGennadiy Civil2019-04-051-0/+1
|\ | | | | | | PiperOrigin-RevId: 242038269
| * clang: explicitly enable/disable RTTI support with the compilerEnji Cooper2019-04-031-1/+2
|/ | | | | | | | | | | | | | | | | | | | Add `-frtti` to the compiler with the base flags case so that RTTI is enabled by default with clang. Add its inverse analog, `cxx_no_rtti_flags` in order to test the case with RTTI off, similar to gcc. This reduces the amount of testing/support overhead needed in the non-RTTI case with clang, as the tests currently fail when these two features are off with version 1.8.1. This something I used in when investigating test failures on FreeBSD, as the tests that rely on RTTI were failing with googletest 1.8.1 on the OS platform. More investigation is being done to determine how this should be fixed on FreeBSD 11.2-RELEASE with ports, as the package doesn't currently compile the tests, and when enabled (based on my WIP diff), the tests fail in similar ways. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* Merge pull request #2126 from ngie-eign:clang-add-more-strict-warningsGennadiy Civil2019-02-221-0/+1
|\ | | | | | | PiperOrigin-RevId: 235220570
| * Add `cxx_strict_flags` for clang to match FreeBSD's WARNS flagsEnji Cooper2019-02-131-0/+1
| | | | | | | | Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* | Ignore `-Wsign-conversion` issuesEnji Cooper2019-02-181-1/+1
|/ | | | | | | | | | clang++ compilation when `-Wsign-conversion` is currently broken and the issues within the code are varied and widespread. For the time being ignore `-Wsign-conversion` issues, even though some of them are valid and bleed over into issues that would be found with `-Wtautological-compare`, et al. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* Merge pull request #2114 from knuto:pr/libtool_supportGennadiy Civil2019-02-131-0/+21
|\ | | | | | | PiperOrigin-RevId: 233773676
| * Generate a libgtest.la to help libtool managing dependenciesKnut Omang2019-02-111-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When building and using googletest from an install tree we want libtool to generate rpath in the dependent binaries to allow them to be executed from a build without a need for LD_LIBRARY_PATH or similar. For libtool based project this happens automatically as projects generates .la files and install them. Provide such a file for gtest as well to allow it to work smoothly with libtool based projects. Signed-off-by: Knut Omang <knut.omang@oracle.com>
* | Compile clang with `-Wall -Wshadow -Werror`Enji Cooper2019-02-121-0/+4
|/ | | | | | It was not compiling any of the code with warnings prior to this. Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
* Avoid dynamic/static runtime linking (LNK4098) by properly replacing ↵Hugo Lindström2019-01-281-0/+2
| | | | MD(d)->MT(d) in both C and CXX flags, resolves 2074
* Googletest exportmisterg2018-12-132-2/+2
| | | | | | Internal Change PiperOrigin-RevId: 225231727
* Issue #1955: Remove THREADS_PREFER_PTHREAD_FLAGLukas Mosimann2018-11-221-1/+0
|
* Googletest exportmisterg2018-11-202-2/+2
| | | | | | Internal Change PiperOrigin-RevId: 222123106
* Add back warning suppression that shouldn't have been removedRobin Lindén2018-11-101-0/+3
|
* Remove workarounds for unsupported MSVC versionsRobin Lindén2018-11-101-26/+1
|
* Merge branch 'master' into relocatable-pkgconfig-fixGennadiy Civil2018-10-121-1/+1
|\
| * Merge 4c92120d6dedb4eeb499a8702faea0224e0a8b23 into ↵David Neto2018-10-111-1/+1
| | | | | | | | | | | | | | | | 658c6390a5b363f46c6ad448ad1bce9d6e97e53a Closes #1893 PiperOrigin-RevId: 216712426
* | Use pcfiledir for prefix in pkgconfig fileFilipp Andjelo2018-10-112-4/+6
|/ | | | | | | Using absolute paths in the pkg-config file makes it not relocatable and leads to problems, when trying to use it with precompiled cross toolchains. Setting prefix to relative path based on pcfiledir makes it more reliable for such cases.
* Unconditionally use std::tuple.Abseil Team2018-10-091-1/+0
| | | | | | Remove all mention of TR1 tuple and our own implementation of tuple. PiperOrigin-RevId: 216395043
* Merge c798e39a4f96f5a985126cc3fab4738b6412cfc1 into ↵Matthieu2018-10-021-19/+71
| | | | | | | | e93da23920e5b6887d6a6a291c3a59f83f5b579e Closes #1836 PiperOrigin-RevId: 215461025
* Merge branch 'master' into issue_1735Jacob Schloss2018-08-222-1/+48
|\
| * Install CMake export filesStefano Soffia2018-08-222-1/+43
| | | | | | | | Rework of the closed pull request #768
| * Merge branch 'master' into fix-msvc-d9025-warningGennadiy Civil2018-08-171-5/+5
| |\
| * | Remove default /EHsc compiler flagWojciech Kaluza2018-07-111-0/+5
| | | | | | | | | | | | | | | | | | This prevents warning D9025 (one command-line option overrides another) on MSVC builds: some test targets are built with the /EHs-c- which conflicts with /EHsc.
* | | It seems like CMAKE_CXX_FLAGS is getting double appended when building as a ↵Jacob Schloss2018-08-221-1/+1
| |/ |/| | | | | | | | | | | | | nested cmake project, which breaks my build as gcc does not allow -specs=nosys.specs to be called multiple times. Removing this fixes it and seems to keep the same compile options, just removing the duplicate definition.
* | Merge branch 'master' into cross-testing-patch-1Gennadiy Civil2018-08-083-23/+66
|\ \
| * | Updated broken and outdated URLsPiotr Kąkol2018-07-251-1/+1
| | |
| * | Pass the --no_stacktrace_support argument to the CMake testsDerek Mauro2018-07-101-3/+3
| |/ | | | | | | | | This does the same thing to the CMake tests that is done to the Bazel tests, and now makes the CMake tests pass.
| * Merge branch 'master' into debug-postfixGennadiy Civil2018-02-281-1/+1
| |\
| | * Merge branch 'master' into win-libcxx2Gennadiy Civil2018-02-271-0/+3
| | |\
| | * | Pass -EHs-c- to disable exceptions with MSVC.Peter Collingbourne2018-01-251-1/+1
| | | |
| * | | Use DEBUG_POSTFIX instead of CMAKE_DEBUG_POSTFIXDavid Neto2018-02-261-0/+4
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | CMAKE_DEBUG_POSTFIX is a global configuration parameter, and changing it pollutes the configuration space for other projects that enclose this project. DEBUG_POSTFIX is better to use since it is a target-specific poperty. Fixes #1334 Fixes #1268
| * | Fix test build issue with GCC7.2.Stefano Soffia2018-01-251-0/+3
| |/
| * Fix tests with VS2015 and VS2017Arkadiy Shapkin2017-10-251-4/+4
| |
| * Merge branch 'master' into hethi/travis-release-buildHerbert Thielen2017-09-071-2/+7
| |\
| | * CMake: use threads if allowed and found, not just if found.Roman Lebedev2017-09-011-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * | treat all warnings as errors for GCC (-Werror)Herbert Thielen2017-09-011-1/+1
| |/
| * create different python based tests for single and multi configuration build ↵Herbert Thielen2017-08-301-9/+21
| | | | | | | | generators
| * Revert "ask cmake for per-configuration output subdir"Herbert Thielen2017-08-301-1/+1
| | | | | | | | | | | | | | This reverts commit 73d58dd4c83883b46697798e978d576b28b1d24e. Unfortunately, ${CMAKE_CFG_INTDIR} is set during build only and doesn't help here.
| * ask cmake for per-configuration output subdirHerbert Thielen2017-08-301-1/+1
| | | | | | | | | | | | | | On single-configuration build systems as Makefile Generators, there is no subdirectory for the configuration in the build tree - therefore ask cmake for the subdir by using CMAKE_CFG_INTDIR, which is just '.' on single-configuration build systems (Linux et al.).
| * remove obsolete comment regarding python tests on linuxHerbert Thielen2017-08-301-2/+0
| |
| * Add support for pkgconfigDavid Seifert2017-08-143-2/+23
| |
* | Fix #923 - support CMAKE_CROSSCOMPILING_EMULATOR for testsMartin Oberhuber2016-11-051-1/+1
|/ | | | | Replaced legacy syntax of cmake add_test() with more modern syntax. This allows running gtests's own tests on remote (cross) systems using CMAKE_CROSSCOMPILING_EMULATOR with cmake-3.3 or newer.
* Merge pull request #721 from ilmagico/fix-mingw-threadsBilly Donahue2016-08-241-1/+3
|\ | | | | Fix compilation of googletest with MinGW using Win32 threads
| * Don't use pthread when on MinGW even if availableDaniele Tamino2016-02-221-1/+3
| | | | | | | | It's not supported, and native Windows threading is available for MinGW