CMake script shebang

Like with shell scripts, standalone CMake scripts can have a first-line shebang that tells the shell what program should execute the script.

#!/usr/bin/env -S cmake -P

While there’s no harm in adding this shebang to CMake scripts, I am not currently aware of a way to pass dynamic “-Dvar=value” to the script when using the shebang like “./myscript.cmake”. If the script is OK without such parameters, then the shebang can be useful.