<div dir="ltr"><div><div>Thank you, Jano Svitok and Volker Enderlein.<br><br></div> I settled for using "set_target_properties( ... )", and to specify multiple LINK_FLAGS I encapsulated both arguments I wanted to pass in a single set of quotes (with a space between them). I suppose the APPEND_STRING approach could also work well, if I wanted to add multiple.<br><br>I appreciate the help!<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 13, 2018 at 9:11 AM, Volker Enderlein <span dir="ltr"><<a href="mailto:volker.enderlein@ifm-chemnitz.de" target="_blank">volker.enderlein@ifm-chemnitz.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
set_target_properties(target PROPERTIES LINK_FLAGS "/OPT:NOREF") should work.<div><div class="h5"><br>
<br>
Am 13/02/2018 um 14:38 schrieb ThePhD:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have a project where I attempt to add linker flags to a Visual Studio project using<br>
<br>
target_link_libraries(lib_targ<wbr>et PRIVATE /OPT:NOREF)<br>
<br>
But it seems like the `/` syntax automatically has CMake assuming that the flag is a file, and it complains it cannot find the file. Is there any way to have CMake recognize a passed-in linker flag using this syntax? As a side note, is there perhaps a better way of passing in Linker flags that I am not aware of? Documentation stated that using "target_link_libraries" is preferred, and I did not find "target_link_options".<br>
<br>
</blockquote></div></div>
-- <br>
<br>
-- <br>
<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" rel="noreferrer" target="_blank">http://www.cmake.org/Wiki/CMak<wbr>e_FAQ</a><br>
<br>
Kitware offers various services to support the CMake community. For more information on each offering, please visit:<br>
<br>
CMake Support: <a href="http://cmake.org/cmake/help/support.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/su<wbr>pport.html</a><br>
CMake Consulting: <a href="http://cmake.org/cmake/help/consulting.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/co<wbr>nsulting.html</a><br>
CMake Training Courses: <a href="http://cmake.org/cmake/help/training.html" rel="noreferrer" target="_blank">http://cmake.org/cmake/help/tr<wbr>aining.html</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensou<wbr>rce/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="https://cmake.org/mailman/listinfo/cmake" rel="noreferrer" target="_blank">https://cmake.org/mailman/list<wbr>info/cmake</a><br>
</blockquote></div><br></div>