googletest icon indicating copy to clipboard operation
googletest copied to clipboard

BUILD_GMOCK variable reset due to cmake policy CMP0077

Open lamasters opened this issue 4 years ago • 2 comments
trafficstars

The cmake flag -DBUILD_GMOCK=OFF will have be reset causing gmock to be built regardless. This will cause issues when building other Google libraries such as protobuf in the same CMake build as the variables will already exist.

lamasters avatar Feb 03 '21 02:02 lamasters

Setting CMake policy CMP0077 to NEW instead of OLD in CMakeLists.txt should fix the issue

lamasters avatar Feb 03 '21 02:02 lamasters

@dinord now that the CMake min is 3.13 this issue can be closed.

https://cmake.org/cmake/help/latest/policy/CMP0077.html#policy:CMP0077

juan-lunarg avatar Jun 21 '23 19:06 juan-lunarg