0

如何将命令行选项从 bii 传递给 cmake?我试过通过-Wdev--debug-output像这样:

bii build -Wdev --debug-output

但它不起作用:

INFO: Processing changes...
Building: "cmake" --build . -Wdev --debug-output
Unknown argument -Wdev
Unknown argument --debug-output
Usage: cmake --build <dir> [options] [-- [native-options]]
Options:
  <dir>          = Project binary directory to be built.
  --target <tgt> = Build <tgt> instead of default targets.
  --config <cfg> = For multi-configuration tools, choose <cfg>.
  --clean-first  = Build target 'clean' first, then build.
                   (To clean only, use --target 'clean'.)
  --use-stderr   = Ignored.  Behavior is default in CMake >= 3.0.
  --             = Pass remaining options to the native tool.
ERROR: Build failed
4

1 回答 1

0

bii build命令不是调用 cmake 项目配置,而是调用cmake --build(你可以在输出中看到它),它依次运行底层构建系统、make、MSBuild...

在调用 bii build 之前,可以将这些选项传递给 bii configure 命令。尝试:

$  bii configure -Wdev --debug-output

您可能会在控制台输出中看到如下内容:

Running: "C:/.../.biicode/cmake-3.2.2-win32-x86/bin\cmake"  -G "MinGW Makefiles" -Wno-dev -Wdev --debug-output ..\cmake
Running with debug output on.

                BLOCK: diego/prueba
   Called from: [1]     C:/.../prueba/bii/cmake/CMakeLists.txt
-----------------------------------------------------------
   Called from: [1]     C:/.../prueba/bii/cmake/CMakeLists.txt

这表明它正在工作。默认情况下,bii 将 -Wno-dev 添加到配置选项中,但随着用户选项(在本例中为 -Wdev)的出现,cmake 保持最新,因此它也可以工作。

于 2015-09-20T19:55:25.360 回答