mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-16 14:08:35 +08:00
FASTBuild: fix excessive std::to_string
`cmStrCat` uses `cmAlphaNum` internally which does conversion from integer to string
This commit is contained in:
@@ -1375,8 +1375,7 @@ void cmFastbuildNormalTargetGenerator::GenerateObjects(FastbuildTarget& target)
|
|||||||
|
|
||||||
for (auto& val : nodesPermutations) {
|
for (auto& val : nodesPermutations) {
|
||||||
auto& objectListNode = val.second;
|
auto& objectListNode = val.second;
|
||||||
objectListNode.Name =
|
objectListNode.Name = cmStrCat(objectListNode.Name, "_", ++groupNameCount);
|
||||||
cmStrCat(objectListNode.Name, "_", std::to_string(++groupNameCount));
|
|
||||||
LogMessage(cmStrCat("ObjectList name: ", objectListNode.Name));
|
LogMessage(cmStrCat("ObjectList name: ", objectListNode.Name));
|
||||||
}
|
}
|
||||||
std::vector<FastbuildObjectListNode>& objects = target.ObjectListNodes;
|
std::vector<FastbuildObjectListNode>& objects = target.ObjectListNodes;
|
||||||
@@ -1476,8 +1475,7 @@ cmFastbuildNormalTargetGenerator::GenerateUnity(
|
|||||||
while (!obj.CompilerInputFiles.empty()) {
|
while (!obj.CompilerInputFiles.empty()) {
|
||||||
FastbuildUnityNode node =
|
FastbuildUnityNode node =
|
||||||
GetOneUnity(isolatedSources, obj.CompilerInputFiles, unitySize);
|
GetOneUnity(isolatedSources, obj.CompilerInputFiles, unitySize);
|
||||||
node.Name =
|
node.Name = cmStrCat(this->GetName(), "_Unity_", ++unityNumber);
|
||||||
cmStrCat(this->GetName(), "_Unity_", std::to_string(++unityNumber));
|
|
||||||
node.UnityOutputPath = obj.CompilerOutputPath;
|
node.UnityOutputPath = obj.CompilerOutputPath;
|
||||||
node.UnityOutputPattern = cmStrCat(node.Name, ext);
|
node.UnityOutputPattern = cmStrCat(node.Name, ext);
|
||||||
|
|
||||||
@@ -1523,8 +1521,8 @@ FastbuildUnityNode cmFastbuildNormalTargetGenerator::GenerateGroupedUnityNode(
|
|||||||
if (iter == inputFiles.end()) {
|
if (iter == inputFiles.end()) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
node.Name = cmStrCat(this->GetName(), "_Unity_Group_", group, '_',
|
node.Name =
|
||||||
std::to_string(++groupId));
|
cmStrCat(this->GetName(), "_Unity_Group_", group, '_', ++groupId);
|
||||||
node.UnityInputFiles.emplace_back(source);
|
node.UnityInputFiles.emplace_back(source);
|
||||||
|
|
||||||
// Remove from the general batching.
|
// Remove from the general batching.
|
||||||
|
@@ -1590,8 +1590,7 @@ void cmGlobalFastbuildGenerator::WriteSolution()
|
|||||||
std::move(projectsInFolder.begin(), projectsInFolder.end(),
|
std::move(projectsInFolder.begin(), projectsInFolder.end(),
|
||||||
std::back_inserter(VSProjectsWithoutFolder));
|
std::back_inserter(VSProjectsWithoutFolder));
|
||||||
} else {
|
} else {
|
||||||
std::string folderName =
|
std::string folderName = cmStrCat("Folder_", ++folderNumber);
|
||||||
cmStrCat("Folder_", std::to_string(++folderNumber));
|
|
||||||
WriteStruct(
|
WriteStruct(
|
||||||
folderName,
|
folderName,
|
||||||
{ { "Path", Quote(pathToFolder) },
|
{ { "Path", Quote(pathToFolder) },
|
||||||
|
Reference in New Issue
Block a user