[CMake] Ignore library flags now works in 2.4.8!

Mark Wyszomierski markww at gmail.com
Mon Feb 18 16:11:42 EST 2008


Ah you're right, I had it paired with a call to:

    SET_TARGET_PROPERTIES(myapp PROPERTIES
                                                 LINK_FLAGS_DEBUG

${VS_MULTITHREADED_DEBUG_IGNORE_LIBRARY_FLAGS})

which I overlooked - I added the same for the release version and it
work. I haven't looked at this for a few months, sorry about the
confusion,

Thanks,
Mark


On Feb 18, 2008 4:08 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
>
> Mark Wyszomierski wrote:
> > Hi,
> >
> > I just downloaded the new CMake version 2.4 patch 8. This command now works:
> >
> >     SET(VS_MULTITHREADED_DEBUG_IGNORE_LIBRARY_FLAGS
> >        "/NODEFAULTLIB:nafxcwd.lib
> >         /NODEFAULTLIB:libcmtd.lib"
> >     )
> >
> > I want to do the same thing for my release builds, kind of like:
> >
> >     SET(VS_MULTITHREADED_RELEASE_IGNORE_LIBRARY_FLAGS
> >        "/NODEFAULTLIB:nafxcw.lib
> >         /NODEFAULTLIB:libcmt.lib"
> >     )
> >
> > but that above command doesn't seem to do anything, the two libraries
> > listed don't appear in my ignore library string for release builds.
> > What's the proper command?
> >
>
> I don't see how that SET does anything other than set a variable.  It
> must be how your project uses that variable.
> VS_MULTITHREADED_DEBUG_IGNORE_LIBRARY_FLAGS is not a variable that CMake
> looks at...  2.4.8 did fix the problem with multiple /NODEFAULTLIB lines
> not working.
>
> -Bill
>


More information about the CMake mailing list