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

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

Issue 26561005: GYP generator for GN (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/gyp_binary_target_writer.cc ('k') | tools/gn/gyp_helper.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 (c) 2013 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_GYP_HELPER_H_
6 #define TOOLS_GN_GYP_HELPER_H_
7
8 #include <string>
9
10 #include "base/basictypes.h"
11
12 class Err;
13 class SourceDir;
14 class SourceFile;
15 class Target;
16
17 // Danger this class is NOT threadsafe and reads the targets in a
18 // non-threadsafe way, so this should only be used in single-threaded mode.
19 class GypHelper {
20 public:
21 GypHelper();
22 ~GypHelper();
23
24 SourceFile GetGypFileForTarget(const Target* target, Err* err) const;
25
26 // Returns the name part of the given target. Example "base". This will
27 // include toolchain info for non-default toolchains.
28 std::string GetNameForTarget(const Target* target) const;
29
30 // Returns a full reference to the given target, including the GYP file
31 // and name. Example "<(DEPTH)/base/base.gyp:base".
32 std::string GetFullRefForTarget(const Target* target) const;
33
34 std::string GetFileReference(const SourceFile& file) const;
35 std::string GetDirReference(const SourceDir& dir, bool include_slash) const;
36
37 private:
38 DISALLOW_COPY_AND_ASSIGN(GypHelper);
39 };
40
41 #endif // TOOLS_GN_GYP_HELPER_H_
OLDNEW
« no previous file with comments | « tools/gn/gyp_binary_target_writer.cc ('k') | tools/gn/gyp_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698