[cmake-developers] RfD: deprecate link_directories() and link_libraries()

Ben Boeckel ben.boeckel at kitware.com
Mon Sep 3 13:21:59 EDT 2018


On Tue, Aug 21, 2018 at 09:14:37 +0200, Gregor Jasny via cmake-developers wrote:
> How would one deal with '#pragma comment lib' w/o link_directories()?

I usually disable it with `-DBOOST_ALL_NO_LIB` (for Boost). In addition,
I find them to be not useful because Boost library names change between
static and shared (so they can live beside each other) and if you don't
set the preprocessor definitions right, they're not going to even use
the right filename anyways. Easier to just turn off autolinking and have
CMake do the right thing.

--Ben


More information about the cmake-developers mailing list