<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Current automoc settings more or less, it's a solution with a few projects some of which are marked AUTOMOC:<br>## Relative to root in solution explorer<br>set_property(GLOBAL PROPERTY AUTOGEN_TARGETS_FOLDER "${VS_FOLDER_PREFIX}/Sandbox/AUTOMOC_Targets") <br>## Relative to each project<br>set_property(GLOBAL PROPERTY AUTOGEN_SOURCE_GROUP "AUTOMOC_Generated")<br><br>AUTOGEN_TARGETS_FOLDER doesn't get created, but in CMake 3.12 it did the same and worked.<br><br>AUTOMOC_Generated gets created (per project ofc) and added in CMake 3.12 during the build.<br>For CMake 3.13 it gets created, but not added (not visible in solution explorer) during build, gotta re-run CMake to include it.</div></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 28, 2019 at 11:04 PM Venedict Tchistopolskii <<a href="mailto:venytch@gmail.com">venytch@gmail.com</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"><div dir="ltr"><div dir="ltr">tl;dr, the below does not work for me:<br><br>The resulting <code class="gmail-m_-5512946546224850544gmail-docutils gmail-m_-5512946546224850544gmail-literal gmail-m_-5512946546224850544gmail-notranslate"><span class="gmail-m_-5512946546224850544gmail-pre">moc_<basename>.cpp</span></code> files are generated in custom
directories and automatically included in a generated
<code class="gmail-m_-5512946546224850544gmail-docutils gmail-m_-5512946546224850544gmail-literal gmail-m_-5512946546224850544gmail-notranslate"><span class="gmail-m_-5512946546224850544gmail-pre"><AUTOGEN_BUILD_DIR>/mocs_compilation.cpp</span></code> file,
<b>which is compiled as part of the target. (nope....)</b><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail-m_-5512946546224850544gmail_attr">On Mon, Jan 28, 2019 at 10:06 PM Venedict Tchistopolskii <<a href="mailto:venytch@gmail.com" target="_blank">venytch@gmail.com</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"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><div><div>The first CMake generation pass: Generates but no inclusion<br></div><br></div><b>Forcing a second pass makes it include the newly generated moc.<br><br></b></div><div>It says <b>"AutoMoc: Generating 'XXXXX' because the MOC settings changed"</b><br></div><b><br></b></div><div>I'm
not too clear on why this is happening, any ideas on how to fix it, or
force it to reload whatever 'moc settings' are changing?<br><br></div>Possibly related: <a href="https://gitlab.kitware.com/cmake/cmake/issues/17456" target="_blank">https://gitlab.kitware.com/cmake/cmake/issues/17456</a><br><br></div><div>e.g. mocs_compilation.cpp and include_XXXX folder -> Created but not added until CMake re-run....</div></div></div>
</blockquote></div>
</blockquote></div>