ccmake messes up terminal window when failing right away
ccmake manipulates the terminal window to make it interactive rather than a teletype-printer-like endless sequence of lines. And - when it quits, it restores the terminal to its state before it ran.
However, in some case when ccmake fails early - it terminates without restoring the terminal, leaving it in a weird state where typed characters are not echoed, and successive lines don't get CRLF'ed, only LF'ed. Example: If we write ccmake --build my_build_dir
, we get something like:
CMake Error: Unknown argument --build
CMake Error: Run 'cmake --help' for all supported options.
[joeuser@myhost ~/src/myproj]$
Please make sure that the terminal restoration code is triggered also when such errors (not just this specific one please) occur.