[Interest] Three-file modules vs. moc

Thiago Macieira thiago.macieira at intel.com
Tue Sep 1 17:10:04 CEST 2020


On Monday, 31 August 2020 09:31:17 PDT Bernhard Lindner wrote:
> It appears to me that qmake is looking for "#include "moc_module.cpp"" using
> some simple regular expression which does not take any conditional
> compilation into account. Is this correct?

Correct, qmake does not preprocess, but it does try to guess what your 
dependencies are. This is not restricted to moc outputs: any #include found 
that match a source file is automatically removed from the list of targets to 
build too.

A more correct way to do this would be to use GCC's makefile dependencies 
output flags (-MM, etc.). But I guess no one wants to implement new features 
for qmake.

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Interest mailing list