Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: tools/gn/visual_studio_writer.cc

Issue 1667553003: Make sure VS projects order is always the same in solution (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/visual_studio_writer.cc
diff --git a/tools/gn/visual_studio_writer.cc b/tools/gn/visual_studio_writer.cc
index 968e046b72fb129979ea276b5fe8cb0f5cc0aabb..951b81dc2e4ee90dc5b084cd2b152163de00a314 100644
--- a/tools/gn/visual_studio_writer.cc
+++ b/tools/gn/visual_studio_writer.cc
@@ -236,6 +236,13 @@ bool VisualStudioWriter::RunAndWriteFiles(const BuildSettings* build_settings,
return false;
}
+ // Sort projects so they appear always in the same order in solution file.
+ // Otherwise solution file is rewritten and reloaded by Visual Studio.
+ std::sort(writer.projects_.begin(), writer.projects_.end(),
+ [](const SolutionEntry* a, const SolutionEntry* b) {
+ return a->path < b->path;
+ });
+
writer.ResolveSolutionFolders();
return writer.WriteSolutionFile(err);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698