summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-08-08 12:11:10 +0200
committerSebastian Holtermann <sebholt@xwmw.org>2017-08-08 12:11:10 +0200
commit6a0605c71126b15e607cc57d3e589ffc693f5c0e (patch)
tree3ec616e5bf9a585b33755970d011b4db1293e1ca
parent8fb12ce7a22ffe21cb9dfc20ffaf111d0897a34a (diff)
downloadcmake-6a0605c71126b15e607cc57d3e589ffc693f5c0e.tar.gz
Autogen: Always create AUTOMOC/AUTOUIC include directory
The **AUTOGEN** include directory was always passed to the compiler but only generated on demand. To avoid compiler complaints when using `-Wmissing-include-dirs` make sure the directory gets created always. Closes #17147
-rw-r--r--Source/cmQtAutoGenerators.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 042d1117a9..c79f66da5b 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -727,6 +727,17 @@ bool cmQtAutoGenerators::RunAutogen()
// moc file is included anywhere a moc_<filename>.cpp file is created and
// included in the mocs_compilation_$<CONFIG>.cpp file.
+ // Create AUTOGEN include directory
+ {
+ const std::string incDirAbs = cmSystemTools::CollapseCombinedPath(
+ this->AutogenBuildDir, this->AutogenIncludeDir);
+ if (!cmsys::SystemTools::MakeDirectory(incDirAbs)) {
+ this->LogError("AutoGen: Error: Could not create include directory " +
+ Quoted(incDirAbs));
+ return false;
+ }
+ }
+
// key = moc source filepath, value = moc output filepath
std::map<std::string, std::string> mocsIncluded;
std::map<std::string, std::string> mocsNotIncluded;