[Question] Avoiding multiple downloads with FetchContent

This page summarizes the projects mentioned and recommended in the original post on /r/cmake

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Google Test

    GoogleTest - Google Testing and Mocking Framework

  • if(EXISTS $ENV{HOME}/local/repo/googletest) set(repo_googletest "file://$ENV{HOME}/local/repo/googletest") else() set(repo_googletest "https://github.com/google/googletest.git") endif() include(FetchContent) set(BUILD_GMOCK TRUE CACHE BOOL "" FORCE) # do not repeat option, because of description FetchContent_Declare(googletest GIT_REPOSITORY ${repo_googletest} GIT_TAG release-1.11.0 ) FetchContent_MakeAvailable(googletest)

  • timesheet

  • The whole thing can be wrapped in a function, of course. Example: https://gitlab.com/mariokonrad/timesheet/-/blob/master/cmake/UsePackage.cmake (sorry for the lack of documentation, at least there is a TODO ;-)

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts