mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 19:30:13 -06:00
Autogen: Generators: Make class static method a source static function
This commit is contained in:
@@ -97,6 +97,25 @@ static bool ListContains(const std::vector<std::string>& list,
|
||||
return (std::find(list.begin(), list.end(), entry) != list.end());
|
||||
}
|
||||
|
||||
static std::string JoinExts(const std::vector<std::string>& lst)
|
||||
{
|
||||
if (lst.empty()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string result;
|
||||
std::string separator = ",";
|
||||
for (std::vector<std::string>::const_iterator it = lst.begin();
|
||||
it != lst.end(); ++it) {
|
||||
if (it != lst.begin()) {
|
||||
result += separator;
|
||||
}
|
||||
result += '.' + (*it);
|
||||
}
|
||||
result.erase(result.end() - 1);
|
||||
return result;
|
||||
}
|
||||
|
||||
static void UicMergeOptions(std::vector<std::string>& opts,
|
||||
const std::vector<std::string>& fileOpts,
|
||||
bool isQt5)
|
||||
@@ -749,7 +768,7 @@ bool cmQtAutoGenerators::ParseContentForMoc(
|
||||
err << "AutoMoc: Error: " << absFilename << "\n"
|
||||
<< "The file includes the moc file \"" << currentMoc
|
||||
<< "\", but could not find header \"" << basename << '{'
|
||||
<< this->JoinExts(headerExtensions) << "}\" ";
|
||||
<< JoinExts(headerExtensions) << "}\" ";
|
||||
if (mocSubDir.empty()) {
|
||||
err << "in " << scannedFileAbsPath << "\n";
|
||||
} else {
|
||||
@@ -1509,22 +1528,3 @@ bool cmQtAutoGenerators::MakeParentDirectory(const std::string& filename)
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
std::string cmQtAutoGenerators::JoinExts(const std::vector<std::string>& lst)
|
||||
{
|
||||
if (lst.empty()) {
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string result;
|
||||
std::string separator = ",";
|
||||
for (std::vector<std::string>::const_iterator it = lst.begin();
|
||||
it != lst.end(); ++it) {
|
||||
if (it != lst.begin()) {
|
||||
result += separator;
|
||||
}
|
||||
result += '.' + (*it);
|
||||
}
|
||||
result.erase(result.end() - 1);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -106,7 +106,6 @@ private:
|
||||
bool NameCollisionTest(const std::map<std::string, std::string>& genFiles,
|
||||
std::multimap<std::string, std::string>& collisions);
|
||||
bool MakeParentDirectory(const std::string& filename);
|
||||
static std::string JoinExts(const std::vector<std::string>& lst);
|
||||
|
||||
// - Target names
|
||||
std::string OriginTargetName;
|
||||
|
||||
Reference in New Issue
Block a user