summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerators.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-08-08 10:11:10 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-08-08 10:11:10 (GMT)
commit6a0605c71126b15e607cc57d3e589ffc693f5c0e (patch)
tree3ec616e5bf9a585b33755970d011b4db1293e1ca /Source/cmQtAutoGenerators.cxx
parent8fb12ce7a22ffe21cb9dfc20ffaf111d0897a34a (diff)
downloadCMake-6a0605c71126b15e607cc57d3e589ffc693f5c0e.zip
CMake-6a0605c71126b15e607cc57d3e589ffc693f5c0e.tar.gz
CMake-6a0605c71126b15e607cc57d3e589ffc693f5c0e.tar.bz2
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
Diffstat (limited to 'Source/cmQtAutoGenerators.cxx')
-rw-r--r--Source/cmQtAutoGenerators.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 042d111..c79f66d 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;