Reputation: 6547
I have a piece of cmake that runs a add_custom_target()
which takes about a minute to run. When running this command over cmake, stdout only gets printed once the full command is done.
-- Build files have been written to: C:/Soft_Dev/590008/JLSCONTROL/JLSOCSOURCE/MASTER/build
Building using cmake
Repo version is: v-0.1.0-902-gffaf1bb-dirty.
[1/2] cmd.exe /C "cd /D C:\myprogram\build && C:\pclint\lint4jsondb.exe --lint-binary pclp64.exe --jobs 10 -- std.lnt"
When I run cmd.exe /C "cd /D C:\myprogram\build && C:\pclint\lint4jsondb.exe --lint-binary pclp64.exe --jobs 10 -- std.lnt"
by myself in a terminal the output gets printed to stdout live while running the command.
Does cmake buffer stdout? If so, is there a way to stop this and let it continue printing while running the custom command?
I am not using any specific arguments at the moment, just the name of the target and then the command with arguments.
add_custom_target(LINT_WITH_PC_LINT ${PC_LINT_COMPILECOMMANDS_EXECUTABLE}
--compilation-db compile_commands.json
--lint-path ${PC_LINT_DIRECTORY}
--lint-binary ${PC_LINT_FILENAME}
--jobs 10
-- std.lnt ${PC_LINT_USER_FLAGS})
Upvotes: 6
Views: 1066
Reputation: 41
Not sure if this is what you want, but you can add "USES_TERMINAL" to your custom target.
Upvotes: 4