Subject: Re: [boost] [cmake] Pull request announcement
From: James E. King III (jking_at_[hidden])
Date: 2018-09-19 13:08:42
On Mon, Sep 17, 2018 at 12:02 PM Peter Dimov via Boost <
> Mike Dev wrote:
> > > I'd like to see an example of how a CMake project using Boost (f.ex.
> > > System) would look like, assuming your proposed pull requests are
> > > accepted.
> > Sure. You can have a look at
> > file(GLOB boost_lib_cmake_files libs/*/CMakeLists.txt)
> I wonder what would happen if Hana, Yap or Beast are present. :-)
Absolutely, positively do NOT use GLOB for project build chains or for
header or source discovery.
There are well documented reasons not to do this. You must express the
dependency chain in
linear order in libs/CMakeLists.txt.
I would have the boostorg/CMakeLists.txt call:
add_subdirectories ( libs )
after it has included all the things libs depends on.
Then have libs/CMakeLists.txt call add_subdirectories in dependency order.
That is the only way you can reasonably ensure a linear dependency chain.