OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TOOLS_GN_VISUAL_STUDIO_WRITER_H_ | 5 #ifndef TOOLS_GN_VISUAL_STUDIO_WRITER_H_ |
6 #define TOOLS_GN_VISUAL_STUDIO_WRITER_H_ | 6 #define TOOLS_GN_VISUAL_STUDIO_WRITER_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 #include <string> | 10 #include <string> |
(...skipping 14 matching lines...) Expand all Loading... |
25 class Target; | 25 class Target; |
26 | 26 |
27 class VisualStudioWriter { | 27 class VisualStudioWriter { |
28 public: | 28 public: |
29 enum Version { | 29 enum Version { |
30 Vs2013 = 1, // Visual Studio 2013 | 30 Vs2013 = 1, // Visual Studio 2013 |
31 Vs2015 // Visual Studio 2015 | 31 Vs2015 // Visual Studio 2015 |
32 }; | 32 }; |
33 | 33 |
34 // Writes Visual Studio project and solution files. |sln_name| is the optional | 34 // Writes Visual Studio project and solution files. |sln_name| is the optional |
35 // solution file name ("all" is used if not specified). |dir_filters| is | 35 // solution file name ("all" is used if not specified). |filters| is optional |
36 // optional semicolon-separated list of label patterns used to limit the set | 36 // semicolon-separated list of label patterns used to limit the set of |
37 // of generated projects. Only matching targets will be included to the | 37 // generated projects. Only matching targets and their dependencies (unless |
38 // solution. On failure will populate |err| and will return false. | 38 // |no_deps| is true) will be included to the solution. On failure will |
| 39 // populate |err| and will return false. |
39 static bool RunAndWriteFiles(const BuildSettings* build_settings, | 40 static bool RunAndWriteFiles(const BuildSettings* build_settings, |
40 const Builder& builder, | 41 const Builder& builder, |
41 Version version, | 42 Version version, |
42 const std::string& sln_name, | 43 const std::string& sln_name, |
43 const std::string& dir_filters, | 44 const std::string& filters, |
| 45 bool no_deps, |
44 Err* err); | 46 Err* err); |
45 | 47 |
46 private: | 48 private: |
47 FRIEND_TEST_ALL_PREFIXES(VisualStudioWriterTest, ResolveSolutionFolders); | 49 FRIEND_TEST_ALL_PREFIXES(VisualStudioWriterTest, ResolveSolutionFolders); |
48 FRIEND_TEST_ALL_PREFIXES(VisualStudioWriterTest, | 50 FRIEND_TEST_ALL_PREFIXES(VisualStudioWriterTest, |
49 ResolveSolutionFolders_AbsPath); | 51 ResolveSolutionFolders_AbsPath); |
50 | 52 |
51 // Solution project or folder. | 53 // Solution project or folder. |
52 struct SolutionEntry { | 54 struct SolutionEntry { |
53 SolutionEntry(const std::string& name, | 55 SolutionEntry(const std::string& name, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 // Semicolon-separated Windows SDK include directories. | 146 // Semicolon-separated Windows SDK include directories. |
145 std::string windows_kits_include_dirs_; | 147 std::string windows_kits_include_dirs_; |
146 | 148 |
147 // Path formatter for ninja targets. | 149 // Path formatter for ninja targets. |
148 PathOutput ninja_path_output_; | 150 PathOutput ninja_path_output_; |
149 | 151 |
150 DISALLOW_COPY_AND_ASSIGN(VisualStudioWriter); | 152 DISALLOW_COPY_AND_ASSIGN(VisualStudioWriter); |
151 }; | 153 }; |
152 | 154 |
153 #endif // TOOLS_GN_VISUAL_STUDIO_WRITER_H_ | 155 #endif // TOOLS_GN_VISUAL_STUDIO_WRITER_H_ |
OLD | NEW |