Created
August 6, 2025 07:18
-
-
Save scivision/de1cd4b1bbdb475dbbcaa34ab3195249 to your computer and use it in GitHub Desktop.
CMake beep the terminal
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makes a beep sound, if not disabled by the kernel or terminal. | |
# This is useful for long-running scripts to signal completion. | |
if(UNIX) | |
execute_process(COMMAND printf \\007) | |
else() | |
execute_process(COMMAND cmd /c "rundll32 user32.dll,MessageBeep") | |
# Rundll32 is much faster than invoking PowerShell, but Powershell also works: | |
# execute_process(COMMAND pwsh -c "Write-Host `a") | |
endif() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment