<div dir="ltr">Thanks! Worked, glad to have a smaller fix.<div><br></div><div>VT</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 31, 2019 at 9:10 AM Sebastian Holtermann <<a href="mailto:seblist@xwmw.org">seblist@xwmw.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">> Any luck? I can try helping ya trace it if you need it.<br>
> <br>
<br>
I traced this down to some degree.<br>
The problem arises from the handling of file path for GENERATED vs non <br>
GENERATED files.<br>
When the full path for a file is computed in cmSourceFile and the file doesn't<br>
exist (mocs_compilation.cpp doesn't, yet), a path error flag is set.<br>
The flag won't be raised when the file has the property GENERATED set, which<br>
mocs_compilation.cpp hasn't at that point.<br>
<br>
A quick solution in your CMakeLists.txt is to mark mocs_compilation.cpp<br>
GENERATED first like this<br>
<br>
```<br>
set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY GENERATED "1")<br>
set_property(SOURCE "${MOC_COMPILATION}" APPEND_STRING PROPERTY COMPILE_FLAGS <br>
" /FI\"${PrecompiledHeader}\"")<br>
```<br>
<br>
This works here for a small example project.<br>
<br>
I'm too busy right now to address this in the CMake sources but I'll try to <br>
look at it next week.<br>
<br>
-Sebastian<br>
<br>
<br>
<br>
<br>
</blockquote></div>