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

Unified Diff: tools/gn/visual_studio_writer.h

Issue 1667773002: Support different project toolchains (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 | tools/gn/visual_studio_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/visual_studio_writer.h
diff --git a/tools/gn/visual_studio_writer.h b/tools/gn/visual_studio_writer.h
index 5f54b3f5aa47be77d4ab3d66560ed550832316e3..bd94f929b7e50214eea0a49f6012f0585e39ad7a 100644
--- a/tools/gn/visual_studio_writer.h
+++ b/tools/gn/visual_studio_writer.h
@@ -38,29 +38,41 @@ class VisualStudioWriter {
SolutionEntry(const std::string& name,
const std::string& path,
const std::string& guid);
-
- ~SolutionEntry();
+ virtual ~SolutionEntry();
// Entry name. For projects must be unique in the solution.
std::string name;
// Absolute project file or folder directory path.
std::string path;
- // Absolute label dir path (only for projects).
- std::string label_dir_path;
// GUID-like string.
std::string guid;
// Pointer to parent folder. nullptr if entry has no parent.
SolutionEntry* parent_folder;
};
- using SolutionEntries = std::vector<SolutionEntry*>;
+ struct SolutionProject : public SolutionEntry {
+ SolutionProject(const std::string& name,
+ const std::string& path,
+ const std::string& guid,
+ const std::string& label_dir_path,
+ const std::string& config_platform);
+ ~SolutionProject() override;
+
+ // Absolute label dir path.
+ std::string label_dir_path;
+ // Configuration platform. May be different than solution config platform.
+ std::string config_platform;
+ };
+
+ using SolutionProjects = std::vector<SolutionProject*>;
+ using SolutionFolders = std::vector<SolutionEntry*>;
explicit VisualStudioWriter(const BuildSettings* build_settings);
~VisualStudioWriter();
bool WriteProjectFiles(const Target* target, Err* err);
bool WriteProjectFileContents(std::ostream& out,
- const SolutionEntry& solution_project,
+ const SolutionProject& solution_project,
const Target* target,
Err* err);
void WriteFiltersFileContents(std::ostream& out, const Target* target);
@@ -77,17 +89,18 @@ class VisualStudioWriter {
// Indicates if project files are generated for Debug mode configuration.
bool is_debug_config_;
- // Platform for projects configuration (Win32, x64).
+ // Platform for solution configuration (Win32, x64). Some projects may be
+ // configured for different platform.
std::string config_platform_;
// All projects contained by solution.
- SolutionEntries projects_;
+ SolutionProjects projects_;
// Absolute root solution folder path.
std::string root_folder_path_;
// Folders for all solution projects.
- SolutionEntries folders_;
+ SolutionFolders folders_;
// Semicolon-separated Windows SDK include directories.
std::string windows_kits_include_dirs_;
« no previous file with comments | « no previous file | tools/gn/visual_studio_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698