Subject: Re: [boost] Proposal for moving Boost to CMake
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-22 12:11:40
Thomas Heller wrote:
> One way to go here is to have one Config.cmake for each build type. For
> example structured like this:
I was thinking of something similar; since CMake will ignore suffix, one
and so on. Inside, each config would only define its target if the
properties match, and define nothing otherwise. But I'm not sure if CMake
works this way, or it just picks up the first one it finds.
Or, the same conditional game could be played in the -version file instead.
For the actual selection, we probably need to define variables such as
BOOST_BUILD_VARIANT, BOOST_RUNTIME_LINK, BOOST_RUNTIME_DEBUGGING,
BOOST_TOOLSET_ID and do some heroic autodetection when these aren't set
depending on the current CMake environment. Having the logic repeated in
each config file won't be pretty though. Ideally, we'll be able to get it
into CMake itself one day, else, we need to install a file containing it and
include it from the config/version ones.