Re: [CMake] Policy to forbid linking with non-cmake-targets

2016-12-12 Thread Alan W. Irwin
On 2016-12-12 13:10+0100 Patrick Boettcher wrote: Hi list, is there a policy which can be enabled to forbid calling target_link_libraries(foo bar) where bar is _not_ a known cmake target? Right now, if 'bar' is not a cmake-target cmake tries to link with -lbar (on linux). Can I inhibit this

[CMake] Policy to forbid linking with non-cmake-targets

2016-12-12 Thread Patrick Boettcher
Hi list, is there a policy which can be enabled to forbid calling target_link_libraries(foo bar) where bar is _not_ a known cmake target? Right now, if 'bar' is not a cmake-target cmake tries to link with -lbar (on linux). Can I inhibit this behavior in any way? I'd prefer cmake telling me