mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 13:20:47 -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());
|
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,
|
static void UicMergeOptions(std::vector<std::string>& opts,
|
||||||
const std::vector<std::string>& fileOpts,
|
const std::vector<std::string>& fileOpts,
|
||||||
bool isQt5)
|
bool isQt5)
|
||||||
@@ -749,7 +768,7 @@ bool cmQtAutoGenerators::ParseContentForMoc(
|
|||||||
err << "AutoMoc: Error: " << absFilename << "\n"
|
err << "AutoMoc: Error: " << absFilename << "\n"
|
||||||
<< "The file includes the moc file \"" << currentMoc
|
<< "The file includes the moc file \"" << currentMoc
|
||||||
<< "\", but could not find header \"" << basename << '{'
|
<< "\", but could not find header \"" << basename << '{'
|
||||||
<< this->JoinExts(headerExtensions) << "}\" ";
|
<< JoinExts(headerExtensions) << "}\" ";
|
||||||
if (mocSubDir.empty()) {
|
if (mocSubDir.empty()) {
|
||||||
err << "in " << scannedFileAbsPath << "\n";
|
err << "in " << scannedFileAbsPath << "\n";
|
||||||
} else {
|
} else {
|
||||||
@@ -1509,22 +1528,3 @@ bool cmQtAutoGenerators::MakeParentDirectory(const std::string& filename)
|
|||||||
}
|
}
|
||||||
return success;
|
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,
|
bool NameCollisionTest(const std::map<std::string, std::string>& genFiles,
|
||||||
std::multimap<std::string, std::string>& collisions);
|
std::multimap<std::string, std::string>& collisions);
|
||||||
bool MakeParentDirectory(const std::string& filename);
|
bool MakeParentDirectory(const std::string& filename);
|
||||||
static std::string JoinExts(const std::vector<std::string>& lst);
|
|
||||||
|
|
||||||
// - Target names
|
// - Target names
|
||||||
std::string OriginTargetName;
|
std::string OriginTargetName;
|
||||||
|
|||||||
Reference in New Issue
Block a user