[cmake-developers] CMake 3.13 - Generated moc files not added to VStudio solution

Venedict Tchistopolskii venytch at gmail.com
Wed Jan 30 10:32:34 EST 2019


Gotcha, my project builds atm and it's fairly large, didn't know that it
broke anything else.

Please let me know when someone fixes it :)

VT

On Wed, Jan 30, 2019 at 6:31 AM Sebastian Holtermann <seblist at xwmw.org>
wrote:

> Hello Venedict,
>
> I took a look at this again, thanks for the additional information.
> In fact this isn't VS specific. I was able to reproduce the issue using
> Linux/Makefiles.
>
> > Got the fix, hopefully it can be merged in :)
> >
> https://github.com/Personwithhat/custom_cmake/commit/d7930c36c6aa7956a806a28
> > 4aa7e1e430ef6c174
>
> This change is too intrusive and breaks a lot of other things.
>
> > >>> set (MOC_COMPILATION
> > >>>
> "${CMAKE_CURRENT_BINARY_DIR}/${TargetProject}_autogen/mocs_compilation.c
> > >>> pp") # stdafx.h needs to be included to ensure platform definitions
> are
> > >>> visible
> > >>> set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY
> > >>> COMPILE_FLAGS " /FI\"${PrecompiledHeader}\"")
>
> Setting compiler flags on the mocs_compilation.cpp file is the root cause.
> I'll investigate this deeper.
>
> -Sebastian
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake-developers/attachments/20190130/d3a671e5/attachment.html>


More information about the cmake-developers mailing list