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

Side by Side Diff: tools/gn/eclipse_writer.h

Issue 1649783003: Port "Eclipse CDT settings" file generation from GYP to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « tools/gn/command_gen.cc ('k') | tools/gn/eclipse_writer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef TOOLS_GN_ECLIPSE_WRITER_H_
6 #define TOOLS_GN_ECLIPSE_WRITER_H_
7
8 #include <iosfwd>
9 #include <map>
10 #include <set>
11 #include <string>
12 #include <vector>
13
14 #include "base/macros.h"
15
16 class BuildSettings;
17 class Builder;
18 class Err;
19 class Target;
20
21 class EclipseWriter {
22 public:
23 static bool RunAndWriteFile(const BuildSettings* build_settings,
24 const Builder* builder,
25 Err* err);
26
27 private:
28 EclipseWriter(const BuildSettings* build_settings,
29 const Builder* builder,
30 std::ostream& out);
31 ~EclipseWriter();
32
33 void Run();
34
35 // Populates |include_dirs_| with the include dirs of all the targets for the
36 // default toolchain.
37 void GetAllIncludeDirs();
38
39 // Populates |defines_| with the defines of all the targets for the default
40 // toolchain.
41 void GetAllDefines();
42
43 // Returns true if |target| uses the default toolchain.
44 bool UsesDefaultToolchain(const Target* target) const;
45
46 // Writes the XML settings file.
47 void WriteCDTSettings();
48
49 const BuildSettings* build_settings_;
50 const Builder* builder_;
51
52 // The output stream for the settings file.
53 std::ostream& out_;
54
55 // Eclipse languages for which the include dirs and defines apply.
56 std::vector<std::string> languages_;
57
58 // The include dirs of all the targets which use the default toolchain.
59 std::set<std::string> include_dirs_;
60
61 // The defines of all the targets which use the default toolchain.
62 std::map<std::string, std::string> defines_;
63
64 DISALLOW_COPY_AND_ASSIGN(EclipseWriter);
65 };
66
67 #endif // TOOLS_GN_ECLIPSE_WRITER_H_
OLDNEW
« no previous file with comments | « tools/gn/command_gen.cc ('k') | tools/gn/eclipse_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698