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.
5 #ifndef TOOLS_GN_NINJA_WRITER_H_
6 #define TOOLS_GN_NINJA_WRITER_H_
12 #include "base/basictypes.h"
21 // On failure will print an error and will return false.
22 static bool RunAndWriteFiles(const BuildSettings
* build_settings
,
25 // Writes only the toolchain.ninja files, skipping the root buildfile. The
26 // settings for the files written will be added to the vector.
27 static bool RunAndWriteToolchainFiles(
28 const BuildSettings
* build_settings
,
30 std::vector
<const Settings
*>* all_settings
);
33 NinjaWriter(const BuildSettings
* build_settings
, Builder
* builder
);
37 std::vector
<const Settings
*>* all_settings
,
38 std::vector
<const Target
*>* default_targets
);
39 bool WriteRootBuildfiles(const std::vector
<const Settings
*>& all_settings
,
40 const std::vector
<const Target
*>& default_targets
);
42 const BuildSettings
* build_settings_
;
45 DISALLOW_COPY_AND_ASSIGN(NinjaWriter
);
48 #endif // TOOLS_GN_NINJA_WRITER_H_