[CMake] Force MSVC runtime for debug builds

Stephan Menzel stephan.menzel at gmail.com
Fri Nov 11 09:42:11 EST 2016


On Tue, Nov 8, 2016 at 4:21 PM, <clinton at elemtech.com> wrote:
>
> If you are going to use /MD instead of /MDd, then you probably also need
> to remove the _DEBUG preprocessor flag.
> IIRC, I've seen cases where defining _DEBUG includes symbols only
> defined by the debug runtimes.
>
> Clint
>

What a surprise. Removing _DEBUG did the trick. I was under the impression
_DEBUG only controls Microsoft STL impl's debug iterator stuff but
apparently it also makes the resulting exe link with /MD rather than /MDd.
Guess that was wrong.

So yes, problem solved.

Thank you!

Stephan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161111/d6bf2a6c/attachment.html>


More information about the CMake mailing list