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

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

Issue 1606553002: Add support for Mac/iOS application bundles to GN tool. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: base_unittests builds and pass all tests with GN 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_TARGET_H_ 5 #ifndef TOOLS_GN_TARGET_H_
6 #define TOOLS_GN_TARGET_H_ 6 #define TOOLS_GN_TARGET_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 22 matching lines...) Expand all
33 public: 33 public:
34 enum OutputType { 34 enum OutputType {
35 UNKNOWN, 35 UNKNOWN,
36 GROUP, 36 GROUP,
37 EXECUTABLE, 37 EXECUTABLE,
38 SHARED_LIBRARY, 38 SHARED_LIBRARY,
39 LOADABLE_MODULE, 39 LOADABLE_MODULE,
40 STATIC_LIBRARY, 40 STATIC_LIBRARY,
41 SOURCE_SET, 41 SOURCE_SET,
42 COPY_FILES, 42 COPY_FILES,
43 COPY_BUNDLE_DATA,
43 ACTION, 44 ACTION,
44 ACTION_FOREACH, 45 ACTION_FOREACH,
45 }; 46 };
46 47
47 enum DepsIterationType { 48 enum DepsIterationType {
48 DEPS_ALL, // Iterates through all public, private, and data deps. 49 DEPS_ALL, // Iterates through all public, private, and data deps.
49 DEPS_LINKED, // Iterates through all non-data dependencies. 50 DEPS_LINKED, // Iterates through all non-data dependencies.
50 }; 51 };
51 52
52 typedef std::vector<SourceFile> FileList; 53 typedef std::vector<SourceFile> FileList;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // directories or files. They do not need to exist, these are just passed as 128 // directories or files. They do not need to exist, these are just passed as
128 // runtime dependencies to external test systems as necessary. 129 // runtime dependencies to external test systems as necessary.
129 const std::vector<std::string>& data() const { return data_; } 130 const std::vector<std::string>& data() const { return data_; }
130 std::vector<std::string>& data() { return data_; } 131 std::vector<std::string>& data() { return data_; }
131 132
132 // Returns true if targets depending on this one should have an order 133 // Returns true if targets depending on this one should have an order
133 // dependency. 134 // dependency.
134 bool hard_dep() const { 135 bool hard_dep() const {
135 return output_type_ == ACTION || 136 return output_type_ == ACTION ||
136 output_type_ == ACTION_FOREACH || 137 output_type_ == ACTION_FOREACH ||
137 output_type_ == COPY_FILES; 138 output_type_ == COPY_FILES ||
139 output_type_ == COPY_BUNDLE_DATA;
brettw 2016/01/20 22:23:17 Are you sure you need this? The COPY_FILES rule i
sdefresne 2016/01/21 22:00:56 Good point. Removed.
138 } 140 }
139 141
140 // Returns the iterator range which can be used in range-based for loops 142 // Returns the iterator range which can be used in range-based for loops
141 // to iterate over multiple types of deps in one loop: 143 // to iterate over multiple types of deps in one loop:
142 // for (const auto& pair : target->GetDeps(Target::DEPS_ALL)) ... 144 // for (const auto& pair : target->GetDeps(Target::DEPS_ALL)) ...
143 DepsIteratorRange GetDeps(DepsIterationType type) const; 145 DepsIteratorRange GetDeps(DepsIterationType type) const;
144 146
145 // Linked private dependencies. 147 // Linked private dependencies.
146 const LabelTargetVector& private_deps() const { return private_deps_; } 148 const LabelTargetVector& private_deps() const { return private_deps_; }
147 LabelTargetVector& private_deps() { return private_deps_; } 149 LabelTargetVector& private_deps() { return private_deps_; }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
320 322
321 // Output files. Empty until the target is resolved. 323 // Output files. Empty until the target is resolved.
322 std::vector<OutputFile> computed_outputs_; 324 std::vector<OutputFile> computed_outputs_;
323 OutputFile link_output_file_; 325 OutputFile link_output_file_;
324 OutputFile dependency_output_file_; 326 OutputFile dependency_output_file_;
325 327
326 DISALLOW_COPY_AND_ASSIGN(Target); 328 DISALLOW_COPY_AND_ASSIGN(Target);
327 }; 329 };
328 330
329 #endif // TOOLS_GN_TARGET_H_ 331 #endif // TOOLS_GN_TARGET_H_
OLDNEW
« tools/gn/functions_target.cc ('K') | « tools/gn/runtime_deps.cc ('k') | tools/gn/target.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698