Files
15daksh-2003 e135fd8e44 Makefiles: Group parallel build output via GNU Make --output-sync
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
2026-08-13 10:00:13 -04:00

2 lines
62 B
CMake

add_custom_target(drive ALL COMMAND $(CMAKE_COMMAND) -E true)