How do I pass command-line options to cmake from bii? I tried passing -Wdev and --debug-output like this:
bii build -Wdev --debug-output
but it doesn't work:
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
The
bii buildcommand is not invoking cmake project configuration, it is calling thecmake --build(you can see it in the output), which in turn runs the underlaying build system, make, MSBuild...Those options can be pased to the bii configure command, prior to invoking bii build. Try:
You might see in the console output something as:
Which indicates that it is working. By default bii adds the -Wno-dev to the configuration options, but as the user options (in this case -Wdev) comes later, cmake keeps the latest, so it works too.