diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:17 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-08 09:13:17 +0900 |
commit | 5dfa20f6e3908ae58658cd105297f8aa3b4eb1d6 (patch) | |
tree | 7edb8aa96d464a81152f81bf0a6b85415f99999f /Source | |
parent | a9a515dd6b7b96484920a3f0f1202393b91dfd2e (diff) | |
download | cmake-5dfa20f6e3908ae58658cd105297f8aa3b4eb1d6.tar.gz cmake-5dfa20f6e3908ae58658cd105297f8aa3b4eb1d6.tar.bz2 cmake-5dfa20f6e3908ae58658cd105297f8aa3b4eb1d6.zip |
Imported Upstream version 3.11.1upstream/3.11.1
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/CPack/cpack.cxx | 8 | ||||
-rw-r--r-- | Source/cmCommandArgumentParserHelper.cxx | 9 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.cxx | 23 | ||||
-rw-r--r-- | Source/cmGlobalXCodeGenerator.h | 2 | ||||
-rw-r--r-- | Source/cmLocalVisualStudio7Generator.cxx | 13 | ||||
-rw-r--r-- | Source/cmMakefile.cxx | 9 | ||||
-rw-r--r-- | Source/cmQtAutoGenerator.cxx | 111 | ||||
-rw-r--r-- | Source/cmQtAutoGenerator.h | 38 | ||||
-rw-r--r-- | Source/cmQtAutoGeneratorMocUic.cxx | 52 | ||||
-rw-r--r-- | Source/cmQtAutoGeneratorMocUic.h | 2 | ||||
-rw-r--r-- | Source/cmQtAutoGeneratorRcc.cxx | 8 | ||||
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 7 |
13 files changed, 214 insertions, 70 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index 533d59fec..b69c12586 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 11) -set(CMake_VERSION_PATCH 0) +set(CMake_VERSION_PATCH 1) #set(CMake_VERSION_RC 0) diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index 507a10c3e..b6ff38b84 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -350,16 +350,16 @@ int main(int argc, char const* const* argv) } if (parsed) { cpackGenerator = generators.NewGenerator(gen); - if (!cpackGenerator) { + if (cpackGenerator) { + cpackGenerator->SetTrace(trace); + cpackGenerator->SetTraceExpand(traceExpand); + } else { cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "Cannot initialize CPack generator: " << gen << std::endl); parsed = 0; } - cpackGenerator->SetTrace(trace); - cpackGenerator->SetTraceExpand(traceExpand); - if (parsed && !cpackGenerator->Initialize(gen, mf)) { cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "Cannot initialize the generator " << gen diff --git a/Source/cmCommandArgumentParserHelper.cxx b/Source/cmCommandArgumentParserHelper.cxx index bf314bddf..ccb4f88b0 100644 --- a/Source/cmCommandArgumentParserHelper.cxx +++ b/Source/cmCommandArgumentParserHelper.cxx @@ -101,10 +101,11 @@ const char* cmCommandArgumentParserHelper::ExpandVariable(const char* var) // not been "cleared"/initialized with a set(foo ) call if (this->WarnUninitialized && !this->Makefile->VariableInitialized(var)) { if (this->CheckSystemVars || - cmSystemTools::IsSubDirectory(this->FileName, - this->Makefile->GetHomeDirectory()) || - cmSystemTools::IsSubDirectory( - this->FileName, this->Makefile->GetHomeOutputDirectory())) { + (this->FileName && + (cmSystemTools::IsSubDirectory( + this->FileName, this->Makefile->GetHomeDirectory()) || + cmSystemTools::IsSubDirectory( + this->FileName, this->Makefile->GetHomeOutputDirectory())))) { std::ostringstream msg; msg << "uninitialized variable \'" << var << "\'"; this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, msg.str()); diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx index 8f6107178..2008a0b8c 100644 --- a/Source/cmGlobalXCodeGenerator.cxx +++ b/Source/cmGlobalXCodeGenerator.cxx @@ -821,6 +821,19 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateXCodeSourceFile( return buildFile; } +void cmGlobalXCodeGenerator::AddXCodeProjBuildRule( + cmGeneratorTarget* target, std::vector<cmSourceFile*>& sources) const +{ + std::string listfile = + target->GetLocalGenerator()->GetCurrentSourceDirectory(); + listfile += "/CMakeLists.txt"; + cmSourceFile* srcCMakeLists = target->Makefile->GetOrCreateSource(listfile); + if (std::find(sources.begin(), sources.end(), srcCMakeLists) == + sources.end()) { + sources.push_back(srcCMakeLists); + } +} + std::string GetSourcecodeValueFromFileExtension(const std::string& _ext, const std::string& lang, bool& keepLastKnownFileType) @@ -1043,10 +1056,7 @@ bool cmGlobalXCodeGenerator::CreateXCodeTargets( } // Add CMakeLists.txt file for user convenience. - std::string listfile = - gtgt->GetLocalGenerator()->GetCurrentSourceDirectory(); - listfile += "/CMakeLists.txt"; - classes.push_back(gtgt->Makefile->GetOrCreateSource(listfile)); + this->AddXCodeProjBuildRule(gtgt, classes); std::sort(classes.begin(), classes.end(), cmSourceFilePathCompare()); @@ -2343,10 +2353,7 @@ cmXCodeObject* cmGlobalXCodeGenerator::CreateUtilityTarget( } // Add CMakeLists.txt file for user convenience. - std::string listfile = - gtgt->GetLocalGenerator()->GetCurrentSourceDirectory(); - listfile += "/CMakeLists.txt"; - sources.push_back(gtgt->Makefile->GetOrCreateSource(listfile)); + this->AddXCodeProjBuildRule(gtgt, sources); for (auto sourceFile : sources) { if (!sourceFile->GetPropertyAsBool("GENERATED")) { diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h index b45887e37..7c5117759 100644 --- a/Source/cmGlobalXCodeGenerator.h +++ b/Source/cmGlobalXCodeGenerator.h @@ -198,6 +198,8 @@ private: cmGeneratorTarget* target); cmXCodeObject* CreateXCodeSourceFile(cmLocalGenerator* gen, cmSourceFile* sf, cmGeneratorTarget* gtgt); + void AddXCodeProjBuildRule(cmGeneratorTarget* target, + std::vector<cmSourceFile*>& sources) const; bool CreateXCodeTargets(cmLocalGenerator* gen, std::vector<cmXCodeObject*>&); bool IsHeaderFile(cmSourceFile*); void AddDependTarget(cmXCodeObject* target, cmXCodeObject* dependTarget); diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 98b1c4458..13503ad8c 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -1347,7 +1347,18 @@ void cmLocalVisualStudio7Generator::WriteVCProjFile(std::ostream& fout, for (size_t ci = 0; ci < configs.size(); ++ci) { acs.Configs.push_back(ci); } - sources.Sources.emplace_back(std::move(acs)); + bool haveCMakeLists = false; + for (cmGeneratorTarget::AllConfigSource& si : sources.Sources) { + if (si.Source == sf) { + haveCMakeLists = true; + // Replace the explicit source reference with our generated one. + si = acs; + break; + } + } + if (!haveCMakeLists) { + sources.Sources.emplace_back(std::move(acs)); + } } } diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx index b46820822..71359a271 100644 --- a/Source/cmMakefile.cxx +++ b/Source/cmMakefile.cxx @@ -2679,10 +2679,11 @@ cmake::MessageType cmMakefile::ExpandVariablesInStringNew( if (this->GetCMakeInstance()->GetWarnUninitialized() && !this->VariableInitialized(lookup)) { if (this->CheckSystemVars || - cmSystemTools::IsSubDirectory(filename, - this->GetHomeDirectory()) || - cmSystemTools::IsSubDirectory( - filename, this->GetHomeOutputDirectory())) { + (filename && + (cmSystemTools::IsSubDirectory(filename, + this->GetHomeDirectory()) || + cmSystemTools::IsSubDirectory( + filename, this->GetHomeOutputDirectory())))) { std::ostringstream msg; msg << "uninitialized variable \'" << lookup << "\'"; this->IssueMessage(cmake::AUTHOR_WARNING, msg.str()); diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx index 1939bd4e6..4aa1b1fa4 100644 --- a/Source/cmQtAutoGenerator.cxx +++ b/Source/cmQtAutoGenerator.cxx @@ -146,19 +146,93 @@ void cmQtAutoGenerator::Logger::ErrorCommand( } } -std::string cmQtAutoGenerator::FileSystem::RealPath( +std::string cmQtAutoGenerator::FileSystem::GetRealPath( std::string const& filename) { std::lock_guard<std::mutex> lock(Mutex_); return cmSystemTools::GetRealPath(filename); } +std::string cmQtAutoGenerator::FileSystem::CollapseCombinedPath( + std::string const& dir, std::string const& file) +{ + std::lock_guard<std::mutex> lock(Mutex_); + return cmSystemTools::CollapseCombinedPath(dir, file); +} + +void cmQtAutoGenerator::FileSystem::SplitPath( + const std::string& p, std::vector<std::string>& components, + bool expand_home_dir) +{ + std::lock_guard<std::mutex> lock(Mutex_); + cmSystemTools::SplitPath(p, components, expand_home_dir); +} + +std::string cmQtAutoGenerator::FileSystem::JoinPath( + const std::vector<std::string>& components) +{ + std::lock_guard<std::mutex> lock(Mutex_); + return cmSystemTools::JoinPath(components); +} + +std::string cmQtAutoGenerator::FileSystem::JoinPath( + std::vector<std::string>::const_iterator first, + std::vector<std::string>::const_iterator last) +{ + std::lock_guard<std::mutex> lock(Mutex_); + return cmSystemTools::JoinPath(first, last); +} + +std::string cmQtAutoGenerator::FileSystem::GetFilenameWithoutLastExtension( + const std::string& filename) +{ + std::lock_guard<std::mutex> lock(Mutex_); + return cmSystemTools::GetFilenameWithoutLastExtension(filename); +} + +std::string cmQtAutoGenerator::FileSystem::SubDirPrefix( + std::string const& filename) +{ + std::lock_guard<std::mutex> lock(Mutex_); + return cmQtAutoGen::SubDirPrefix(filename); +} + +void cmQtAutoGenerator::FileSystem::setupFilePathChecksum( + std::string const& currentSrcDir, std::string const& currentBinDir, + std::string const& projectSrcDir, std::string const& projectBinDir) +{ + std::lock_guard<std::mutex> lock(Mutex_); + FilePathChecksum_.setupParentDirs(currentSrcDir, currentBinDir, + projectSrcDir, projectBinDir); +} + +std::string cmQtAutoGenerator::FileSystem::GetFilePathChecksum( + std::string const& filename) +{ + std::lock_guard<std::mutex> lock(Mutex_); + return FilePathChecksum_.getPart(filename); +} + bool cmQtAutoGenerator::FileSystem::FileExists(std::string const& filename) { std::lock_guard<std::mutex> lock(Mutex_); return cmSystemTools::FileExists(filename); } +bool cmQtAutoGenerator::FileSystem::FileExists(std::string const& filename, + bool isFile) +{ + std::lock_guard<std::mutex> lock(Mutex_); + return cmSystemTools::FileExists(filename, isFile); +} + +unsigned long cmQtAutoGenerator::FileSystem::FileLength( + std::string const& filename) +{ + std::lock_guard<std::mutex> lock(Mutex_); + return cmSystemTools::FileLength(filename); +} + bool cmQtAutoGenerator::FileSystem::FileIsOlderThan( std::string const& buildFile, std::string const& sourceFile, std::string* error) @@ -188,35 +262,30 @@ bool cmQtAutoGenerator::FileSystem::FileRead(std::string& content, std::string* error) { bool success = false; - { - std::lock_guard<std::mutex> lock(Mutex_); - if (cmSystemTools::FileExists(filename, true)) { - std::size_t const length = cmSystemTools::FileLength(filename); + if (FileExists(filename, true)) { + unsigned long const length = FileLength(filename); + { + std::lock_guard<std::mutex> lock(Mutex_); cmsys::ifstream ifs(filename.c_str(), (std::ios::in | std::ios::binary)); if (ifs) { - if (length > 0) { - content.resize(length); - ifs.read(&content.front(), content.size()); - if (ifs) { - success = true; - } else { - content.clear(); - if (error != nullptr) { - error->append("Reading from the file failed."); - } - } + content.reserve(length); + content.assign(std::istreambuf_iterator<char>{ ifs }, + std::istreambuf_iterator<char>{}); + if (ifs) { + success = true; } else { - // Readable but empty file content.clear(); - success = true; + if (error != nullptr) { + error->append("Reading from the file failed."); + } } } else if (error != nullptr) { error->append("Opening the file for reading failed."); } - } else if (error != nullptr) { - error->append( - "The file does not exist, is not readable or is a directory."); } + } else if (error != nullptr) { + error->append( + "The file does not exist, is not readable or is a directory."); } return success; } diff --git a/Source/cmQtAutoGenerator.h b/Source/cmQtAutoGenerator.h index e029d8d6b..299e4c2a0 100644 --- a/Source/cmQtAutoGenerator.h +++ b/Source/cmQtAutoGenerator.h @@ -5,6 +5,7 @@ #include "cmConfigure.h" // IWYU pragma: keep +#include "cmFilePathChecksum.h" #include "cmQtAutoGen.h" #include "cmUVHandlePtr.h" #include "cmUVSignalHackRAII.h" // IWYU pragma: keep @@ -68,9 +69,42 @@ public: { } + /// @brief Logger Logger* Log() const { return Log_; } - std::string RealPath(std::string const& filename); + + // -- Paths + /// @brief Wrapper for cmSystemTools::GetRealPath + std::string GetRealPath(std::string const& filename); + /// @brief Wrapper for cmSystemTools::CollapseCombinedPath + std::string CollapseCombinedPath(std::string const& dir, + std::string const& file); + /// @brief Wrapper for cmSystemTools::SplitPath + void SplitPath(const std::string& p, std::vector<std::string>& components, + bool expand_home_dir = true); + /// @brief Wrapper for cmSystemTools::JoinPath + std::string JoinPath(const std::vector<std::string>& components); + /// @brief Wrapper for cmSystemTools::JoinPath + std::string JoinPath(std::vector<std::string>::const_iterator first, + std::vector<std::string>::const_iterator last); + /// @brief Wrapper for cmSystemTools::GetFilenameWithoutLastExtension + std::string GetFilenameWithoutLastExtension(const std::string& filename); + /// @brief Wrapper for cmQtAutoGen::SubDirPrefix + std::string SubDirPrefix(std::string const& filename); + /// @brief Wrapper for cmFilePathChecksum::setupParentDirs + void setupFilePathChecksum(std::string const& currentSrcDir, + std::string const& currentBinDir, + std::string const& projectSrcDir, + std::string const& projectBinDir); + /// @brief Wrapper for cmFilePathChecksum::getPart + std::string GetFilePathChecksum(std::string const& filename); + + // -- File access + /// @brief Wrapper for cmSystemTools::FileExists bool FileExists(std::string const& filename); + /// @brief Wrapper for cmSystemTools::FileExists + bool FileExists(std::string const& filename, bool isFile); + /// @brief Wrapper for cmSystemTools::FileLength + unsigned long FileLength(std::string const& filename); bool FileIsOlderThan(std::string const& buildFile, std::string const& sourceFile, std::string* error = nullptr); @@ -92,6 +126,7 @@ public: bool FileRemove(std::string const& filename); bool Touch(std::string const& filename); + // -- Directory access bool MakeDirectory(std::string const& dirname); /// @brief Error logging version bool MakeDirectory(GeneratorT genType, std::string const& dirname); @@ -102,6 +137,7 @@ public: private: std::mutex Mutex_; + cmFilePathChecksum FilePathChecksum_; Logger* Log_; }; diff --git a/Source/cmQtAutoGeneratorMocUic.cxx b/Source/cmQtAutoGeneratorMocUic.cxx index 6be65eea5..e2fd15827 100644 --- a/Source/cmQtAutoGeneratorMocUic.cxx +++ b/Source/cmQtAutoGeneratorMocUic.cxx @@ -26,7 +26,7 @@ std::string cmQtAutoGeneratorMocUic::BaseSettingsT::AbsoluteBuildPath( std::string const& relativePath) const { - return cmSystemTools::CollapseCombinedPath(AutogenBuildDir, relativePath); + return FileSys->CollapseCombinedPath(AutogenBuildDir, relativePath); } /** @@ -106,7 +106,7 @@ std::string cmQtAutoGeneratorMocUic::MocSettingsT::FindIncludedFile( std::string testPath = sourcePath; testPath += includeString; if (FileSys->FileExists(testPath)) { - return FileSys->RealPath(testPath); + return FileSys->GetRealPath(testPath); } } // Search in include directories @@ -115,7 +115,7 @@ std::string cmQtAutoGeneratorMocUic::MocSettingsT::FindIncludedFile( fullPath.push_back('/'); fullPath += includeString; if (FileSys->FileExists(fullPath)) { - return FileSys->RealPath(fullPath); + return FileSys->GetRealPath(fullPath); } } // Return empty string @@ -166,9 +166,9 @@ void cmQtAutoGeneratorMocUic::JobParseT::Process(WorkerT& wrk) MetaT meta; if (wrk.FileSys().FileRead(meta.Content, FileName, &error)) { if (!meta.Content.empty()) { - meta.FileDir = SubDirPrefix(FileName); + meta.FileDir = wrk.FileSys().SubDirPrefix(FileName); meta.FileBase = - cmSystemTools::GetFilenameWithoutLastExtension(FileName); + wrk.FileSys().GetFilenameWithoutLastExtension(FileName); bool success = true; if (AutoMoc) { @@ -222,9 +222,9 @@ bool cmQtAutoGeneratorMocUic::JobParseT::ParseMocSource(WorkerT& wrk, cmsys::RegularExpressionMatch match; while (wrk.Moc().RegExpInclude.find(contentChars, match)) { std::string incString = match.match(2); - std::string incDir(SubDirPrefix(incString)); + std::string incDir(wrk.FileSys().SubDirPrefix(incString)); std::string incBase = - cmSystemTools::GetFilenameWithoutLastExtension(incString); + wrk.FileSys().GetFilenameWithoutLastExtension(incString); if (cmHasLiteralPrefix(incBase, "moc_")) { // moc_<BASE>.cxx // Remove the moc_ part from the base name @@ -487,7 +487,7 @@ std::string cmQtAutoGeneratorMocUic::JobParseT::MocFindIncludedHeader( } // Sanitize if (!header.empty()) { - header = wrk.FileSys().RealPath(header); + header = wrk.FileSys().GetRealPath(header); } return header; } @@ -533,12 +533,12 @@ std::string cmQtAutoGeneratorMocUic::JobParseT::UicFindIncludedFile( { std::string res; std::string searchFile = - cmSystemTools::GetFilenameWithoutLastExtension(includeString).substr(3); + wrk.FileSys().GetFilenameWithoutLastExtension(includeString).substr(3); searchFile += ".ui"; // Collect search paths list std::deque<std::string> testFiles; { - std::string const searchPath = SubDirPrefix(includeString); + std::string const searchPath = wrk.FileSys().SubDirPrefix(includeString); std::string searchFileFull; if (!searchPath.empty()) { @@ -569,7 +569,7 @@ std::string cmQtAutoGeneratorMocUic::JobParseT::UicFindIncludedFile( // Search for the .ui file! for (std::string const& testFile : testFiles) { if (wrk.FileSys().FileExists(testFile)) { - res = wrk.FileSys().RealPath(testFile); + res = wrk.FileSys().GetRealPath(testFile); break; } } @@ -676,9 +676,9 @@ void cmQtAutoGeneratorMocUic::JobMocT::Process(WorkerT& wrk) BuildFile += '/'; BuildFile += IncludeString; } else { - std::string rel = wrk.Base().FilePathChecksum.getPart(SourceFile); + std::string rel = wrk.FileSys().GetFilePathChecksum(SourceFile); rel += "/moc_"; - rel += cmSystemTools::GetFilenameWithoutLastExtension(SourceFile); + rel += wrk.FileSys().GetFilenameWithoutLastExtension(SourceFile); rel += ".cpp"; // Register relative file path wrk.Gen().ParallelMocAutoRegister(rel); @@ -798,7 +798,7 @@ bool cmQtAutoGeneratorMocUic::JobMocT::UpdateRequired(WorkerT& wrk) } // Check dependency timestamps std::string error; - std::string sourceDir = SubDirPrefix(SourceFile); + std::string sourceDir = wrk.FileSys().SubDirPrefix(SourceFile); for (std::string const& depFileRel : Depends) { std::string depFileAbs = wrk.Moc().FindIncludedFile(sourceDir, depFileRel); @@ -853,8 +853,12 @@ void cmQtAutoGeneratorMocUic::JobMocT::GenerateMoc(WorkerT& wrk) ProcessResultT result; if (wrk.RunProcess(GeneratorT::MOC, result, cmd)) { // Moc command success + // Print moc output + if (!result.StdOut.empty()) { + wrk.LogInfo(GeneratorT::MOC, result.StdOut); + } + // Notify the generator that a not included file changed (on demand) if (IncludeString.empty()) { - // Notify the generator that a not included file changed wrk.Gen().ParallelMocAutoUpdated(); } } else { @@ -963,9 +967,13 @@ void cmQtAutoGeneratorMocUic::JobUicT::GenerateUic(WorkerT& wrk) ProcessResultT result; if (wrk.RunProcess(GeneratorT::UIC, result, cmd)) { - // Success + // Uic command success + // Print uic output + if (!result.StdOut.empty()) { + wrk.LogInfo(GeneratorT::UIC, result.StdOut); + } } else { - // Command failed + // Uic command failed { std::string emsg = "The uic process failed to compile\n "; emsg += Quoted(SourceFile); @@ -1416,8 +1424,8 @@ bool cmQtAutoGeneratorMocUic::Init(cmMakefile* makefile) // Search for the default header file and a private header { std::array<std::string, 2> bases; - bases[0] = SubDirPrefix(src); - bases[0] += cmSystemTools::GetFilenameWithoutLastExtension(src); + bases[0] = FileSys().SubDirPrefix(src); + bases[0] += FileSys().GetFilenameWithoutLastExtension(src); bases[1] = bases[0]; bases[1] += "_p"; for (std::string const& headerBase : bases) { @@ -1444,7 +1452,7 @@ bool cmQtAutoGeneratorMocUic::Init(cmMakefile* makefile) // ------------------------ // Init file path checksum generator - Base_.FilePathChecksum.setupParentDirs( + FileSys().setupFilePathChecksum( Base().CurrentSourceDir, Base().CurrentBinaryDir, Base().ProjectSourceDir, Base().ProjectBinaryDir); @@ -1503,8 +1511,8 @@ bool cmQtAutoGeneratorMocUic::Init(cmMakefile* makefile) if (cmHasLiteralSuffix(path, ".framework/Headers")) { // Go up twice to get to the framework root std::vector<std::string> pathComponents; - cmSystemTools::SplitPath(path, pathComponents); - std::string frameworkPath = cmSystemTools::JoinPath( + FileSys().SplitPath(path, pathComponents); + std::string frameworkPath = FileSys().JoinPath( pathComponents.begin(), pathComponents.end() - 2); frameworkPaths.insert(frameworkPath); } diff --git a/Source/cmQtAutoGeneratorMocUic.h b/Source/cmQtAutoGeneratorMocUic.h index 696d5bdb2..222695411 100644 --- a/Source/cmQtAutoGeneratorMocUic.h +++ b/Source/cmQtAutoGeneratorMocUic.h @@ -5,7 +5,6 @@ #include "cmConfigure.h" // IWYU pragma: keep -#include "cmFilePathChecksum.h" #include "cmQtAutoGen.h" #include "cmQtAutoGenerator.h" #include "cmUVHandlePtr.h" @@ -95,7 +94,6 @@ public: std::string AutogenBuildDir; std::string AutogenIncludeDir; // - Files - cmFilePathChecksum FilePathChecksum; std::vector<std::string> HeaderExtensions; // - File system FileSystem* FileSys; diff --git a/Source/cmQtAutoGeneratorRcc.cxx b/Source/cmQtAutoGeneratorRcc.cxx index 2bf00f7aa..84ec5e2e4 100644 --- a/Source/cmQtAutoGeneratorRcc.cxx +++ b/Source/cmQtAutoGeneratorRcc.cxx @@ -533,10 +533,14 @@ bool cmQtAutoGeneratorRcc::GenerateRcc() if (Process_->IsFinished()) { // Process is finished if (!ProcessResult_.error()) { - // Process success + // Rcc process success + // Print rcc output + if (!ProcessResult_.StdOut.empty()) { + Log().Info(GeneratorT::RCC, ProcessResult_.StdOut); + } BuildFileChanged_ = true; } else { - // Process failed + // Rcc process failed { std::string emsg = "The rcc process failed to compile\n "; emsg += Quoted(QrcFile_); diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index ec31bd628..8a9df8f94 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -1898,7 +1898,14 @@ void cmVisualStudio10TargetGenerator::WriteAllSources() std::vector<cmGeneratorTarget::AllConfigSource> const& sources = this->GeneratorTarget->GetAllConfigSources(); + cmSourceFile const* srcCMakeLists = + this->LocalGenerator->CreateVCProjBuildRule(); + for (cmGeneratorTarget::AllConfigSource const& si : sources) { + if (si.Source == srcCMakeLists) { + // Skip explicit reference to CMakeLists.txt source. + continue; + } std::string tool; switch (si.Kind) { case cmGeneratorTarget::SourceKindAppManifest: |