mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03:00
A parallel `cmake --build` with a Makefiles generator interleaved the output of concurrent recipes. When CMake is the one passing the parallel flag and a build-time probe finds GNU Make 4.0 or newer, append `-Otarget` so each recipe's output stays grouped. A native `-- -j` leaves the job count unset and opts out. Honor `USES_TERMINAL` under grouping by prefixing such recipes with a `$(CMAKE_USES_TERMINAL_PREFIX)` variable, empty by default and set to `+` next to `-Otarget`, so interactive commands stay unbuffered. Fixes: #27510
10 lines
507 B
ReStructuredText
10 lines
507 B
ReStructuredText
cmake-build-output-sync
|
|
-----------------------
|
|
|
|
* The :option:`cmake --build` command now groups the output of each recipe in
|
|
a parallel build so that concurrent jobs do not interleave, when CMake is
|
|
the one passing the parallel flag to the build tool (via :option:`--parallel
|
|
<cmake--build --parallel>` or :envvar:`CMAKE_BUILD_PARALLEL_LEVEL`) and that
|
|
tool is GNU Make 4.0 or newer. Request parallelism natively, e.g.
|
|
``cmake --build . -- -j``, to opt out and stream output as it is produced.
|