[cmake-developers] push of LinkOptionsCommand topic branch

Stephen Kelly steveire at gmail.com
Wed Feb 5 17:06:22 EST 2014


Steve Wilson wrote:

> Now, everything you have said about not encouraging this kind of usage for
> target_link_options() and libraries, etc… is valid.   However, does that
> standard apply to tests.   Are tests just tests?

Admittedly, the target_compile_options tests use defines as test input. I'd 
gladly swap that out for an alternative flag if there were a suitable flag 
which gave us the same test coverage on the dashboard. The 
add_compile_options command documents itself as not suitable for 
preprocessor defines and include directories, however. I guess 
target_compile_options documentation should get a similar note.

I would also like to see the target_link_options documentation discourage 
use for specifying libraries.

If you feel so strongly about using a -llibrary flag in the tests, then 
that's ok, but for me 'the file must exist' is a winning argument in favor 
of not doing that.

> I’m not trying to argue that tests should become a sloppy application of
> various principles of CMake usage, I’m just pointing out that in testing a
> linker option, it was a valid test, even though in actual usage you would
> link libraries with target_link_libraries().    

Yes, that comes across.

Thanks,

Steve.





More information about the cmake-developers mailing list