Subject: Re: [boost] [cmake] Minimum viable cmakeification for Boost
From: Thomas Heller (thom.heller_at_[hidden])
Date: 2017-06-20 12:30:12
On Tue, Jun 20, 2017 at 2:19 PM, Peter Dimov via Boost <
> "P F" wrote:
> - Having things like `::hl` or `::sl` is quite strange. In cmake, I set
>> `BUILD_SHARED_LIBS=On` when I want a shared library or I set it to
>> `BUILD_SHARED_LIBS=Off` when I want a static library. There should only be
>> one target `boost::config` or `boost::system` that I use.
> Niall says that using the global BUILD_SHARED_LIBS is a cmake2ism, and
> that explicit targets are preferred nowadays.
Niall, can you point me to a reference stating this? Preferably some cmake
documentation telling me what the right(tm) thing to do is.
As a general observation, I see a lot of statements along the lines of "I
state that XYZ is preferable over UVW", it would be nice to have to have
background information (pros and cons anyone? what do the cmake
authors/docs have to say about this?) on those statements so that everyone
can form their own opinion instead of having to choose whom to trust about
what's "standard" cmake.
> - Doing `if(NOT TARGET boost::assert::hl)` is wrong. A target does not
>> have to exists to be able to link against it.
> The second sentence has nothing to do with the first. The if is just to
> detect if the target has already been declared, in order to avoid declaring
> it twice, like an (external) include guard.
> Unsubscribe & other changes: http://lists.boost.org/mailman