<div dir="ltr"><div>In some cases it is not convenient to program something in CMakeFile.txt (for example when I clone some 3rd party project and want to change its build procedure).</div><div>Thus the possibility to add additional .defs files with the help of <b>command line</b> options would be very nice. Such a command line option exists: -DMAKE_SHARED_LINKER_FLAGS, but it deliberately ignores /DEF: which makes impossible to add
/DEF: this easy (and for me preferable) way.</div><div><br></div><div>I would like to get an answer from CMake developers, if it is an expected behavior of
MAKE_SHARED_LINKER_FLAGS.</div><div>If yes: what is the logic behind it and why this special handling of MAKE_SHARED_LINKER_FLAGS is not documented on <a href="https://cmake.org/cmake/help/v3.15/variable/CMAKE_SHARED_LINKER_FLAGS.html">https://cmake.org/cmake/help/v3.15/variable/CMAKE_SHARED_LINKER_FLAGS.html</a>.</div><div>If no: issue a bug.</div><div><br></div><div>--</div><div>Best Regards,</div><div>Alexander</div><div><br></div>Do it mean that </div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, 8 Oct 2019 at 16:57, Brad King <<a href="mailto:brad.king@kitware.com">brad.king@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 10/8/19 8:10 AM, Alexander wrote:<br>
> I found that CMake ignores /DEF: option in CMAKE_SHARED_LINKER_FLAGS.<br>
> I would like to know if this is an expected behaviour or a bug.<br>
<br>
A module definition file can be passed as a normal source file and<br>
CMake will automatically add `/DEF:...` to the link line as needed.<br>
<br>
-Brad<br>
</blockquote></div>