[CMake] issue with target_link_libraries and MSVC

Benjamin Ballet bballet at ivsweb.com
Tue Apr 12 11:29:51 EDT 2016


I'm trying to add the openmp flag to a target with target_link_libraries.
\openmp is interpreted as a file name and visual try to link to \openmp.obj

The documentation state that target_link_libraries see an item as a flag if
it start with - but MSVC flags start with \

Is there a way to add a link flags to a target with target_link_libraries
and MSVC ?

Thank you all

-- 
*Benjamin BALLET*
Ingénieur R&D

*ACTIVISU*
19, rue Klock - 92110 Clichy
*> Standard Tél* :  01 44 69 37 37
*>* www.activisu.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160412/ad8a55d8/attachment.html>


More information about the CMake mailing list