Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
You can see that in action here: https://github.com/friendlyanon/cmake-init-fetchcontent This example has the idiomatic find_package(headeronly REQUIRED) call in the CMakeLists.txt, but when configuring ${sourceDir}/cmake/find is added to CMAKE_MODULE_PATH, so the FetchContent code is run to "find" the dependency. There are comments to further explain this.
The book is nice to have but absolutely not necessary. cmake-init was created without the book and someone who has said book told me that it basically implements everything that the book recommends you do and some more.
Not if they if(COMMAND) correctly and use cmake_language(CALL) as described. Basically both need to implement what is done here: https://github.com/microsoft/vcpkg/pull/23195