PDB files should be created at the same location as their primary
artifact, which is either static library or a DLL.
On Windows, an artifact location is controlled by:
* RUNTIME_OUTPUT_DIRECTORY is a directory of a DLL artifact.
* ARCHIVE_OUTPUT_DIRECTORY is a directory of a LIB artifact.
A PDB file location is controlled:
* PDB_OUTPUT_DIRECTORY should match a directory of a DLL artifact.
* COMPILE_PDB_OUTPUT_DIRECTORY should match a directory of a LIB artifact.
CMake policy CMP0094 controls a lookup strategy used to find a Python
executable:
* CMP0094=OLD selects a Python executable with a higher version.
* CMP0094=NEW selects a Python executable found earlier in PATH.
NEW behavior is critical in presence of a Python virtual environment
established and activated, i.e. added to the PATH variable.
In case GoogleTest is embedded into a larger project, the result of
`find_package(Python)` affects the whole build, not only GoogleTest
component itself.
v1.12.x is the last branch to support C++11
Future releases will require at least C++14
PiperOrigin-RevId: 458250106
Change-Id: Ibee2248649ff3c13daaa179135887848bf730f3f
Note that this is 1.12.1 as there will be a patch release to fix this
PiperOrigin-RevId: 458216994
Change-Id: Ibca52a8db22ed06cb1a1adc4832be67fce69459a
Some Mock constructors insert the pointer to the Mock itself into a
global registry. Since GCC cannot see how the pointer is used (only as
an identifier), it cannot tell that the object doesn't need to be
initialized at that point at all. Work around this by using uintptr_t
instead.
PiperOrigin-RevId: 452380347
Change-Id: Ia5a493057ed90719de1d0efab71de9a8a08ddf8b
This fixes unused parameter errors under both MSVC and clang (when
`-Werror=unused-parameter` is used, as reported
[here](9d21db9e0a (r74769946))).
Fixes#3858
PiperOrigin-RevId: 451907906
Change-Id: Ic07da19ea6a547eb1797fbbab19cd57cc2a83fe8
Do this by ripping out the "untyped perform action" machinery, which isn't
necessary: we can simply template the entry point on the result type, and use
RAII to avoid the need to special case void. This makes it easier to understand
the code and harder to introduce type-related undefined behavior, to boot.
PiperOrigin-RevId: 451493451
Change-Id: I225305f83164752ca92f2916721972eafba33168
Previously this excluded callables that return non-moveable types. This is the
same as the
[libc++ std::is_invocable_r bug](https://github.com/llvm/llvm-project/issues/55346)
fixed by
[this commit](https://github.com/llvm/llvm-project/commit/c3a24882903d): it's
wrong to use std::is_convertible for checking the return type, since (despite
its name) that doesn't check the standard-defined notion of "implicitly
convertible". Instead we must base the check on whether the source type can be
used as an argument to a function that accepts the destination type.
PiperOrigin-RevId: 451341205
Change-Id: I2530051312a0361ea7a2ce26993ae973c9242089
In order to make the diff more readable in an upcoming commit that requires the
method to be templated on the action's result type.
PiperOrigin-RevId: 451157029
Change-Id: I57beb7544efccd0459efb3a1f039ea45cd7c7602