[cmake-developers] CMake removes /DEF: option in CMAKE_SHARED_LINKER_FLAGS

Alexander alexander.samoylov at gmail.com
Wed Oct 9 18:04:35 EDT 2019


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).
Thus the possibility to add additional .defs files with the help of *command
line* 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.

I would like to get an answer from CMake developers, if it is an expected
behavior of  MAKE_SHARED_LINKER_FLAGS.
If yes: what is the logic behind it and why this special handling of
MAKE_SHARED_LINKER_FLAGS is not documented on
https://cmake.org/cmake/help/v3.15/variable/CMAKE_SHARED_LINKER_FLAGS.html.
If no: issue a bug.

--
Best Regards,
Alexander

Do it mean that

On Tue, 8 Oct 2019 at 16:57, Brad King <brad.king at kitware.com> wrote:

> On 10/8/19 8:10 AM, Alexander wrote:
> > I found that CMake ignores /DEF: option in CMAKE_SHARED_LINKER_FLAGS.
> > I would like to know if this is an expected behaviour or a bug.
>
> A module definition file can be passed as a normal source file and
> CMake will automatically add `/DEF:...` to the link line as needed.
>
> -Brad
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20191010/b461091f/attachment.html>


More information about the cmake-developers mailing list