[CMake] Repeating pre-processor definitions in MSVC generated projects

James Swift james at pspdfkit.com
Thu Oct 6 03:42:48 EDT 2016


Hi,

I have some curious behaviour here. I generate MSVC project files, then run
cmake once more and a pre-processor define is duplicated and appended to
the list in the `<PreprocessorDefinitiion>` tag in ".vcproj"
Run cmake again without changing the CMake files and another is appended.

First generation...


<PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;DEBUG......;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)</PreprocessorDefinitions>

Second generation...

    <PreprocessorDefinitions>WIN32;_WINDOWS;_DEBUG;DEBUG;*DEBUG*
......;CMAKE_INTDIR=\"Debug\";%(PreprocessorDefinitions)</PreprocessorDefinitions>

Unfortunately I can't share the `CMakeLists.txt` files with you but hoped
that maybe someone was aware of this issue or if it's a common user mistake.

Of course this causes MSVC to rebuild the entire project even if that
shouldn't be necessary.
Any ideas?

kind regards,
James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20161006/8938b4b3/attachment.html>


More information about the CMake mailing list