Motivation
Plain FetchContent without cmake-tipi-provider is doing an add_subdirectory which makes available all targets to the main project when FetchContent_MakeAvailable(Boost) is called.
In the case of cmake-tipi-provider a call to find_package(boost_filesystem CONFIG REQUIRED) is required because we do the compilation in another CMake build tree and perform an installation to be able to speed up the build and consume cached installed/ trees.
It's possible to bridge both world and provide the ease of FetchContent with the speed of installed/ cache pack without requiring the source code to be always available (cloning the source code of all dependencies for a build is not desirable as it is slow to clone big monorepos like boost, grpc and others and is exactly the value we can provide with FetchContent)
Description
To make this fully transparent we should release and make infer installed cmake packages #564 available, and record installed packages config exported target by parsing out cmake package config file.
Then we could load this information inside cmake-tipi-provider when we resolve the dependency.
Acceptance Criteria
Users of FetchContent with cmake-tipi-provider are not obliged to call find_package to load the targets of the FetchContent'ed installed project.
Motivation
Plain FetchContent without cmake-tipi-provider is doing an
add_subdirectorywhich makes available all targets to the main project whenFetchContent_MakeAvailable(Boost)is called.In the case of cmake-tipi-provider a call to
find_package(boost_filesystem CONFIG REQUIRED)is required because we do the compilation in another CMake build tree and perform an installation to be able to speed up the build and consume cached installed/ trees.It's possible to bridge both world and provide the ease of FetchContent with the speed of installed/ cache pack without requiring the source code to be always available (cloning the source code of all dependencies for a build is not desirable as it is slow to clone big monorepos like boost, grpc and others and is exactly the value we can provide with FetchContent)
Description
To make this fully transparent we should release and make infer installed cmake packages #564 available, and record installed packages config exported target by parsing out cmake package config file.
Then we could load this information inside cmake-tipi-provider when we resolve the dependency.
Acceptance Criteria
Users of FetchContent with cmake-tipi-provider are not obliged to call
find_packageto load the targets of the FetchContent'ed installed project.