Файл сборки ниндзя $ в переменной пропущен из команды - PullRequest
0 голосов
/ 27 июня 2019

У меня есть файл сборки ниндзя, который выглядит следующим образом:

rule cc
  command = cl.exe $cc_no_link $cc_flags $cc_build_flags $cc_out_object $
      $cc_out_debug_info $cc_in_includes $cc_in_file
build Code/GoogleTest/Deploy/gtest-all.obj: cc $
    Code/GoogleTest/src/gtest-all.cc
  cc_no_link = /c
  cc_flags = /EHsc /W4 /WX
  cc_build_flags = /MTd /Od /Zi
  cc_out_object = /FoCode/GoogleTest/Deploy/gtest-all.obj
  cc_out_debug_info = /FdCode/GoogleTest/Deploy/
  cc_in_includes = /ICode/GoogleTest/. /ICode/GoogleTest/include
  cc_in_file = $in

Когда я запускаю ниндзя, он делает следующее:

[1/1] cl.exe /c /EHsc /W4 /WX /MTd /Od /Zi /FoCode/GoogleTest/Deploy/gtest-all.obj  /FdCode/GoogleTest/Deploy/ /ICode/GoogleTest/. /ICode/GoogleTest/include
FAILED: Code/GoogleTest/Deploy/gtest-all.obj
cl.exe /c /EHsc /W4 /WX /MTd /Od /Zi /FoCode/GoogleTest/Deploy/gtest-all.obj  /FdCode/GoogleTest/Deploy/ /ICode/GoogleTest/. /ICode/GoogleTest/include
Microsoft (R) C/C++ Optimizing Compiler Version 19.00.24215.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

cl : Command line error D8003 : missing source filename
ninja: build stopped: subcommand failed.

Похоже, что переменная cc_in_file просто опущена в команде запуска ниндзя. Не установлен ли $in в файл .cc в этом контексте? Или я что-то не так делаю?

Спасибо.

...