diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2018-04-03 10:29:47 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2018-04-03 15:20:30 (GMT) |
commit | 719b24c87244ac612cfdc85da0e75140b87df673 (patch) | |
tree | bca356c3144c4d2313e8229430161e261e05fb8c | |
parent | 9a736158150852e9d011fabc0f4a33ce039be6fc (diff) | |
download | CMake-719b24c87244ac612cfdc85da0e75140b87df673.zip CMake-719b24c87244ac612cfdc85da0e75140b87df673.tar.gz CMake-719b24c87244ac612cfdc85da0e75140b87df673.tar.bz2 |
Autogen: Protected calls to cmQtAutoGen::SubDirPrefix
-rw-r--r-- | Source/cmQtAutoGenerator.cxx | 7 | ||||
-rw-r--r-- | Source/cmQtAutoGenerator.h | 2 | ||||
-rw-r--r-- | Source/cmQtAutoGeneratorMocUic.cxx | 10 |
3 files changed, 14 insertions, 5 deletions
diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx index 77bf2ec..b5e1301 100644 --- a/Source/cmQtAutoGenerator.cxx +++ b/Source/cmQtAutoGenerator.cxx @@ -190,6 +190,13 @@ std::string cmQtAutoGenerator::FileSystem::GetFilenameWithoutLastExtension( return cmSystemTools::GetFilenameWithoutLastExtension(filename); } +std::string cmQtAutoGenerator::FileSystem::SubDirPrefix( + std::string const& filename) +{ + std::lock_guard<std::mutex> lock(Mutex_); + return cmQtAutoGen::SubDirPrefix(filename); +} + bool cmQtAutoGenerator::FileSystem::FileExists(std::string const& filename) { std::lock_guard<std::mutex> lock(Mutex_); diff --git a/Source/cmQtAutoGenerator.h b/Source/cmQtAutoGenerator.h index d6ddbc3..b3a53bc 100644 --- a/Source/cmQtAutoGenerator.h +++ b/Source/cmQtAutoGenerator.h @@ -87,6 +87,8 @@ public: 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); // -- File access bool FileExists(std::string const& filename); diff --git a/Source/cmQtAutoGeneratorMocUic.cxx b/Source/cmQtAutoGeneratorMocUic.cxx index a8ba2ba..c9dec10 100644 --- a/Source/cmQtAutoGeneratorMocUic.cxx +++ b/Source/cmQtAutoGeneratorMocUic.cxx @@ -166,7 +166,7 @@ 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 = wrk.FileSys().GetFilenameWithoutLastExtension(FileName); @@ -222,7 +222,7 @@ 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 = wrk.FileSys().GetFilenameWithoutLastExtension(incString); if (cmHasLiteralPrefix(incBase, "moc_")) { @@ -538,7 +538,7 @@ std::string cmQtAutoGeneratorMocUic::JobParseT::UicFindIncludedFile( // 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()) { @@ -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); @@ -1416,7 +1416,7 @@ 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] = FileSys().SubDirPrefix(src); bases[0] += FileSys().GetFilenameWithoutLastExtension(src); bases[1] = bases[0]; bases[1] += "_p"; |