This is a simple CMake module to send toast notifications to the user across operating systems. This is useful for long-running scripts to signal completion. It has a fallback to Terminal bell.
We didn't use "wall" or for-loop tty because those are annoying / brittle.
- Linux: libnotify-bin
apt install libnotify-bin(fornotify-send) - macOS: none (uses AppleScript)
- Windows:
Install-Module -Name BurntToast(BurntToast module)
include(ToastNotify.cmake)
toast_nofify("Build complete ${CMAKE_CURRENT_BINARY_DIR}")Or more typically using this CMakeLists.txt:
cmake -B build
cmake --build build