C++ 23 · CMake

Download a dependency

Fetch and build a dependency such as GoogleTest at configure time.

include(FetchContent)
FetchContent_Declare(googletest
  URL https://github.com/google/googletest/archive/refs/tags/v1.15.2.zip)
FetchContent_MakeAvailable(googletest)

Official C++ 23 documentation

More cmake commands

All cmake commands · C++ 23 cheatsheet

Was this page helpful?