From 6a0605c71126b15e607cc57d3e589ffc693f5c0e Mon Sep 17 00:00:00 2001 From: Sebastian Holtermann Date: Tue, 8 Aug 2017 12:11:10 +0200 Subject: 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 --- Source/cmQtAutoGenerators.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) 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_.cpp file is created and // included in the mocs_compilation_$.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 mocsIncluded; std::map mocsNotIncluded; -- cgit v0.12