cmake-modules
cmake-modules copied to clipboard
CodeCoverage: causes a cmake warning when used with googletest.
My project builds fine but when I include CodeCoverage.cmake
I get warnings issued from googletest.
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(CodeCoverage)
Causes the warning to be issued:
CMake Warning (dev) in third_party/googletest/googletest/CMakeLists.txt:
Policy CMP0022 is not set: INTERFACE_LINK_LIBRARIES defines the link
interface. Run "cmake --help-policy CMP0022" for policy details. Use the
cmake_policy command to set the policy and suppress this warning.
Target "gtest" has an INTERFACE_LINK_LIBRARIES property which differs from
its LINK_INTERFACE_LIBRARIES properties.
INTERFACE_LINK_LIBRARIES:
gcov;Threads::Threads
LINK_INTERFACE_LIBRARIES:
Threads::Threads
Any idea how to resolve this without setting a CMake policy? Thanks.