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

Side by Side Diff: tools/gn/gyp_binary_target_writer.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
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_BINARY_TARGET_WRITER_H_
6 #define TOOLS_GN_GYP_BINARY_TARGET_WRITER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/compiler_specific.h"
12 #include "tools/gn/gyp_target_writer.h"
13 #include "tools/gn/toolchain.h"
14
15 // Writes a portion of a .gyp file for a binary target type (an executable, a
16 // shared library, or a static library).
17 class GypBinaryTargetWriter : public GypTargetWriter {
18 public:
19 GypBinaryTargetWriter(const Target* debug_target,
20 const Target* release_target,
21 std::ostream& out);
22 virtual ~GypBinaryTargetWriter();
23
24 virtual void Run() OVERRIDE;
25
26 private:
27 void WriteName();
28 void WriteType();
29
30 // The flags can vary between debug and release, so we must pass in the
31 // correct debug or release target to the functions.
32 void WriteFlags(const Target* target);
33 void WriteDefines(const Target* target);
34 void WriteIncludes(const Target* target);
35 void WriteVCFlags(const Target* target);
36
37 void WriteSources();
38 void WriteDeps();
39
40 // The normal |target_| in the base class stores the debug version.
41 const Target* release_target_;
42
43 DISALLOW_COPY_AND_ASSIGN(GypBinaryTargetWriter);
44 };
45
46 #endif // TOOLS_GN_GYP_BINARY_TARGET_WRITER_H_
47
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698