2

I am trying to use Ninja + CMake to build a project.

This project has a custom target that takes additional arguments.

E.g. make target option=value

It works fine in make, however I am not sure how to get Ninja to take in additional command line arguments. Is this possible with a Ninja build?

4

1 回答 1

2

我认为直接通过忍者是不可能的。我刚刚浏览了 Ninja 文档以仔细检查并没有看到任何内容。

相反,您可以通过 CMake 修改 CMake 缓存变量(请参阅cmake -Dcmake -L)。这样你就可以动态地改变你的构建,或者创建几个不同的构建目录,每个目录都有不同的设置。

于 2014-06-20T01:08:50.797 回答