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

Unified Diff: tools/gn/gyp_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 side-by-side diff with in-line comments
Download patch
Index: tools/gn/gyp_target_writer.h
diff --git a/tools/gn/gyp_target_writer.h b/tools/gn/gyp_target_writer.h
new file mode 100644
index 0000000000000000000000000000000000000000..1496fbd97201a51ee910a64cc6bbc77929c1d2cb
--- /dev/null
+++ b/tools/gn/gyp_target_writer.h
@@ -0,0 +1,47 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TOOLS_GN_GYP_TARGET_WRITER_H_
+#define TOOLS_GN_GYP_TARGET_WRITER_H_
+
+#include <iosfwd>
+#include <vector>
+
+#include "base/basictypes.h"
+#include "tools/gn/gyp_helper.h"
+
+class Err;
+class Settings;
+class SourceFile;
+class Target;
+
+class GypTargetWriter {
+ public:
+ struct TargetPair {
+ TargetPair() : debug(NULL), release(NULL) {}
+ const Target* debug;
+ const Target* release;
+ };
+
+ GypTargetWriter(const Target* target, std::ostream& out);
+ virtual ~GypTargetWriter();
+
+ static void WriteFile(const SourceFile& gyp_file,
+ const std::vector<TargetPair>& targets,
+ Err* err);
+
+ virtual void Run() = 0;
+
+ protected:
+ const Settings* settings_; // Non-owning.
+ const Target* target_; // Non-owning.
+ std::ostream& out_;
+
+ GypHelper helper_;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(GypTargetWriter);
+};
+
+#endif // TOOLS_GN_GYP_TARGET_WRITER_H_

Powered by Google App Engine
This is Rietveld 408576698