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

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

Issue 2152413002: GN: don't write separate files for non-binary targets (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: typo Created 4 years, 4 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/ninja_writer.cc ('k') | tools/gn/qt_creator_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
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_QT_CREATOR_WRITER_H_ 5 #ifndef TOOLS_GN_QT_CREATOR_WRITER_H_
6 #define TOOLS_GN_QT_CREATOR_WRITER_H_ 6 #define TOOLS_GN_QT_CREATOR_WRITER_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/files/file_path.h" 11 #include "base/files/file_path.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "tools/gn/err.h" 13 #include "tools/gn/err.h"
14 #include "tools/gn/target.h" 14 #include "tools/gn/target.h"
15 15
16 class Builder; 16 class Builder;
17 class BuildSettings; 17 class BuildSettings;
18 18
19 class QtCreatorWriter { 19 class QtCreatorWriter {
20 public: 20 public:
21 static bool RunAndWriteFile(const BuildSettings* build_settings, 21 static bool RunAndWriteFile(const BuildSettings* build_settings,
22 const Builder* builder, 22 const Builder& builder,
23 Err* err, 23 Err* err,
24 const std::string& root_target); 24 const std::string& root_target);
25 25
26 private: 26 private:
27 QtCreatorWriter(const BuildSettings* build_settings, 27 QtCreatorWriter(const BuildSettings* build_settings,
28 const Builder* builder, 28 const Builder& builder,
29 const base::FilePath& project_prefix, 29 const base::FilePath& project_prefix,
30 const std::string& root_target_name); 30 const std::string& root_target_name);
31 ~QtCreatorWriter(); 31 ~QtCreatorWriter();
32 32
33 void Run(); 33 void Run();
34 34
35 bool DiscoverTargets(); 35 bool DiscoverTargets();
36 void HandleTarget(const Target* target); 36 void HandleTarget(const Target* target);
37 37
38 void CollectDeps(const Target* target); 38 void CollectDeps(const Target* target);
39 void AddToSources(const Target::FileList& files); 39 void AddToSources(const Target::FileList& files);
40 void GenerateFile(const base::FilePath::CharType* suffix, 40 void GenerateFile(const base::FilePath::CharType* suffix,
41 const std::set<std::string>& items); 41 const std::set<std::string>& items);
42 42
43 const BuildSettings* build_settings_; 43 const BuildSettings* build_settings_;
44 const Builder* builder_; 44 const Builder& builder_;
45 base::FilePath project_prefix_; 45 base::FilePath project_prefix_;
46 std::string root_target_name_; 46 std::string root_target_name_;
47 std::set<const Target*> targets_; 47 std::set<const Target*> targets_;
48 std::set<std::string> sources_; 48 std::set<std::string> sources_;
49 std::set<std::string> includes_; 49 std::set<std::string> includes_;
50 std::set<std::string> defines_; 50 std::set<std::string> defines_;
51 Err err_; 51 Err err_;
52 52
53 DISALLOW_COPY_AND_ASSIGN(QtCreatorWriter); 53 DISALLOW_COPY_AND_ASSIGN(QtCreatorWriter);
54 }; 54 };
55 55
56 #endif // TOOLS_GN_QT_CREATOR_WRITER_H_ 56 #endif // TOOLS_GN_QT_CREATOR_WRITER_H_
OLDNEW
« no previous file with comments | « tools/gn/ninja_writer.cc ('k') | tools/gn/qt_creator_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698