Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CodeCoverage: causes a cmake warning when used with googletest. #52

Open
CiaranWelsh opened this issue Jul 6, 2020 · 0 comments
Open

Comments

@CiaranWelsh
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant