Subject: Re: [boost] Proposal for moving Boost to CMake
From: Mathias Gaunard (mathias.gaunard_at_[hidden])
Date: 2017-06-20 08:25:05


On 20 June 2017 at 02:28, Louis Dionne via Boost <boost_at_[hidden]>
wrote:

>
> So, normally, for a project based on CMake, these XYZConfig.cmake files can
> be generated automatically by using `install(EXPORT ...)`. The resulting
> file looks like this (for Hana):
>
>
> https://gist.github.com/ldionne/df7b6888752097e25bfc2333f6d897
> ca#file-what-gets-generated-for-hana-cmake
>
> Basically, we'd want to replicate the functionality provided by this module
> without necessarily all the boilerplate (since that's generated
> automatically). Here's a minimal file for Hana (a header only library):
>
>
> https://gist.github.com/ldionne/df7b6888752097e25bfc2333f6d897
> ca#file-minimal-handwritten-config-header-only-cmake
>
> And here's a minimal XYZConfig.cmake file for a library with compiled
> sources (I added source files to Hana and turned it into a static library
> to
> check this):
>
>
> https://gist.github.com/ldionne/df7b6888752097e25bfc2333f6d897
> ca#file-minimal-handwritten-config-static-cmake
>
> Then, each Boost library would simply provide a file like this and install
> it to the appropriate location when the library is installed. Again, please
> keep in mind this is only the gist of what would need to be done, not an
> actual template.

I'm not sure this is the right approach, what happens when you have a
transitive dependency?
I'd rather just like the direct dependencies, but this format looks like it
would need to contain the transitive dependencies too.