[cmake-developers] RfD: deprecate link_directories() and link_libraries()
Gregor Jasny
gjasny at googlemail.com
Tue Aug 21 03:14:37 EDT 2018
Hello,
On 20.08.18 19:10, Brad King wrote:
> On 08/15/2018 01:30 PM, Rolf Eike Beer wrote:
>> My dislike against these functions is probably known, and now I would like to
>> bring this to a new level: I would like to formally deprecate these functions.
>> I don't think they serve any useful purpose anymore, given that now even the
>> pkg-config module can (and does) return absolute paths to the libraries.
>
> What harm does their presence cause?
>
> Please ask on the user list to see if people are using them.
>
> I suspect they may be used by some projects to link to special runtime
> libraries when cross-compiling. We'd need to make sure there is a
> better way for all such use cases before deprecating the commands.
We use link_directories() on Windows to give the windows linker the path
to the boost libraries. Those use '#pragma comment lib' to link required
libs.
How would one deal with '#pragma comment lib' w/o link_directories()?
Thanks,
Gregor
More information about the cmake-developers
mailing list