Skip to content

cmake --install also installs GoogleTest #71

Description

@petlenz

GoogleTest is fetched with its install rules enabled, so cmake --install drops libgtest*, libgmock* and their headers and CMake config into the consumer's prefix.

Fix

set(INSTALL_GTEST OFF CACHE BOOL "" FORCE) before FetchContent_MakeAvailable(googletest). The install-and-consume CI job from the tmech packaging issue would catch a regression.

All references are to main at 91bd26f.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions