OLD | NEW |
(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 |
OLD | NEW |