diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-29 11:04:52 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-05-29 11:04:52 (GMT) |
commit | 6136ab5e179b33ddd659ad458ad8efd773ec8db8 (patch) | |
tree | 78229e53826b46c2b6a8614ab71a97d50a82f228 /Source/cmGlobalNinjaGenerator.h | |
parent | 6a23fbce47294e746c15ee851dc3460a3a17da2b (diff) | |
download | CMake-6136ab5e179b33ddd659ad458ad8efd773ec8db8.zip CMake-6136ab5e179b33ddd659ad458ad8efd773ec8db8.tar.gz CMake-6136ab5e179b33ddd659ad458ad8efd773ec8db8.tar.bz2 |
Ninja: Use cmNinjaRule as sole parameter in the WriteRule and AddRule methods
Instead of passing multiple strings to the `WriteRule` and `AddRule` methods
of `cmGlobalNinjaGenerator`, pass only a `cmNinjaRule` instance reference,
that is set up beforehand.
Adapt calls to `WriteRule` and `AddRule` in multiple places.
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.h')
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 47685c2..dcc358b 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -138,18 +138,10 @@ public: const std::string& output); /** - * Write a rule statement named @a name to @a os with the @a comment, - * the mandatory @a command, the @a depfile and the @a description. - * It also writes the variables bound to this rule statement. + * Write a rule statement to @a os. * @warning no escaping of any kind is done here. */ - static void WriteRule(std::ostream& os, const std::string& name, - const std::string& command, - const std::string& description, - const std::string& comment, const std::string& depfile, - const std::string& deptype, const std::string& rspfile, - const std::string& rspcontent, - const std::string& restat, bool generator); + static void WriteRule(std::ostream& os, cmNinjaRule const& rule); /** * Write a variable named @a name to @a os with value @a value and an @@ -273,11 +265,7 @@ public: * Call WriteRule() behind the scene but perform some check before like: * - Do not add twice the same rule. */ - void AddRule(const std::string& name, const std::string& command, - const std::string& description, const std::string& comment, - const std::string& depfile, const std::string& deptype, - const std::string& rspfile, const std::string& rspcontent, - const std::string& restat, bool generator); + void AddRule(cmNinjaRule const& rule); bool HasRule(const std::string& name); |