问题标签 [ninja]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
0 回答
189 浏览

c++ - 再次在构建系统上。让我们谈谈完全正确性

最近我尝试了 tup,它的正确性和速度给我留下了非常深刻的印象,而且监视文件系统的事实使该工具非常强大。这也很容易理解。它永远不会出错,当它出错时,它会告诉我。我想找一个更主流、跨平台友好的工具,只要满足下面的要求。

我的问题是:

  1. 您是否知道任何具有以下功能的替代构建工具:

    • O(1) 重建。
    • 完全正确的依赖跟踪。
    • (可选)利用文件系统访问。

编辑:这不是一个主观的“向我推荐一个工具”问题,它是给我满足这些要求的工具的名称,因为我想进一步研究它们在我的用例中的表现。

0 投票
1 回答
588 浏览

c++ - 使用 Visual Studio 2013 编译 Qt 5.4.1 时出现问题

我正在尝试构建 Qt,但无法解决运行“nmake”时出现的错误。我使用了这个配置:

这些选项与 MITK 兼容。我的 Python 版本是 2.7.9,我使用的是 Visual Studio 2013。

错误如下:

预先感谢您的帮助。

0 投票
1 回答
181 浏览

ninja - 从命令行读取 Ninja 构建文件

即使没有文件或其他文件,是否可以从 STDIN 读取Ninja构建文件?build.ninja

0 投票
1 回答
3986 浏览

google-chrome - Google Chrome - 如何在 Windows 中编译 Google Chrome?

提到要编译的文档我必须按照 Windows 的说明操作:http: //www.chromium.org/developers/how-tos/build-instructions-windows

所以我做了所有的步骤,但以下失败了我该如何解决?

在此处输入图像描述

0 投票
1 回答
2453 浏览

c++ - CMake/Ninja 试图编译已删除的“.cpp”文件

我发现当我使用andcpp从我的项目中删除文件时,如果不先完全删除我的构建目录并从头开始,我将无法轻松编译它。CMake 和/或 Ninja 显然隐藏了对其编译的所有文件的许多引用,即使在重新运行 CMake 之前删除 CMake 缓存也不会删除所有引用。cmakeninjacpp

这是一个已知的问题?有解决办法吗?我偶尔只是跑步rm $(grep -R <filename> <builddir>),但那是一个可怕的拼凑。

编辑:看来我错了,因为我无法复制这个问题。手动重新运行 CMake 似乎总是生成正确的.cpp文件列表,甚至GLOB用于生成源列表。

0 投票
1 回答
1231 浏览

c# - Challenge - Ninjascript C# interface with a C++ dll

Alright, here is the deal. I am trying to interface a C++ dll with an indicator written for the NinjaTrader platform (which is written in ninjascript...essentially C# with some platform specific code additions). TO make my dll work the way it is intended, I need to be able to pass a struct array from the indicator to the dll. In the indicator code, I am passing the struct array via ref. In the dll, I am trying to accept the struct array as a pointer. This allows me to edit the contents in the dll, without trying to figure out a way to pass a horde of information back to NinjaTrader. Basically, the dll receives the struct array pointer, which gives it access to the contents directly. Then, when the dll function returns a bool true flag to Ninja, it accesses the struct array and renders the information to the chart. Sounds simple right? I thought so too.

Here is the problem. NinjaTrader does not allow unsafe code. So, when I try to pass the struct array to the dll, and receive it as a pointer, it immediately crashes the platform. If I receive the struct array as a pointer to a ref (*&), then it works, but....once control is passed back to Ninja, all the edits done in the struct array are non-existent.

So, to speed up this process, I have created a very brief indicator, and dll code set which demonstrates what I am trying to do. Here is the ninja indicator code:

And now the C++ dll code:

Now, please keep in mind, this code I have pasted in above WILL cause NinjaTrader to crash the moment you place the indicator on a chart and it becomes active. The only way I have been able to make it NOT crash is to change the arg in the C++ TestFunk function to either TestStruct *&testy or TestStruct **testy, noting that the . operators will have to be changed to -> also.

Now that I have said all that, does anyone know how to get around this limitation and get access to the actual pointer, so the dll can edit the actual values stored in the struct array, which will be reflected inside NinjaTrader....but not crash?

0 投票
2 回答
175 浏览

javascript - 来自 javascript ninja 的书籍秘密示例

开始阅读 javascript ninja book,我真的不明白为什么下面的示例中需要“this”这个词。我试过了,没有它,代码没有运行。'this' 在以下上下文中的作用是什么?我想我理解“这个”(或者可能根本不理解),但在下面,我就是不明白。请告诉我!谢谢你。

0 投票
3 回答
37466 浏览

windows - Windows 上的 CMake -G Ninja 指定 x64

我在带有 Ninja 生成器的 Windows 上使用 CMake

这使用默认的 Windows x86 工具链。如何使用 Ninja 生成器指定 x64?

PS:我知道如何用 Visual Studio 生成 x64

0 投票
0 回答
1318 浏览

c++ - 带有多个“build.ninja”文件的“ninja”?

我想ninja同时启动多个构建。每个构建都在自己的目录中,并且有自己的build.ninja文件。

我可以做到以下几点:

....但这有几个问题:

  • Ninja 使用的默认线程数在同时启动多个独立构建时可能不是最佳的。
  • 我预计输出将以不明智的方式交错。

编辑我也可以将ninja调用保留在前台(这是我目前正在做的),但是没有简单的方法来估计(整个)构建的当前进度是什么。

所以,我想做以下事情之一:

  1. build.ninja文件合并到一个大文件中,该文件可以在一次ninja调用中执行两个构建。
  2. 以某种方式启动ninja多个目标build.ninja脚本。

看起来不支持第二个选项ninja,但第一个选项似乎可以使用subninja <build-dir-n>/build.ninja. 有没有人做过这样的事情?有没有什么隐藏的陷阱?或者,我可以按顺序执行构建(即上述顺序但没有&s),但这感觉不是正确的解决方案。

用例

我正在使用,它为每个构建配置(发布和调试)CMake生成一个单独的文件。build.ninja我还针对多个平台,所以我有多个编译器,并且 CMake 必须为每个平台单独运行。所以如果我想为所有平台构建发布调试代码,我需要运行多次。ninja

0 投票
0 回答
114 浏览

ninja - 为什么 chrome 远程 webapp 构建过程卡住了?

我想使用 chrome 远程桌面代码构建 chrome 远程桌面 Web 应用程序。我已经从存储库中获取现在想要构建 chrome 远程 webapp。我从 4 小时开始尝试以下命令,但它卡住了并且没有响应。4小时后,它会打印日志,例如

ninja -C out/Release/remoting_webapp

日志:忍者版本 0.1.3 初始化
日志:魔术组:gid=0 (root)
日志:进入主循环
日志:生成初始 pid 数组..
日志:现在监控进程活动
日志:新根进程:avahi-autoipd [14897] ppid=14896 uid=0 gid=0
log: - ppid uid=105(avahi-autoipd) gid=113 ppid=1
log: + avahi-autoipd 在魔法组,一切OK!
日志:新根进程:avahi-autoipd[14944] ppid=14943 uid=0 gid=0
日志:-ppid uid=105(avahi-autoipd) gid=113 ppid=1
日志:+ avahi-autoipd 在魔法组中,一切都好!

在这里它卡住了,不再继续。需要多少时间?有什么错误吗?

有没有人可以帮助我?