Boost logo

Boost :

Subject: Re: [boost] [cmake] Minimum viable cmakeification for Boost
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-20 12:19:35

"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.

> - 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.

Boost list run by bdawes at, gregod at, cpdaniel at, john at