20 Jun
2017
20 Jun
'17
12:19 p.m.
"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.