Use case: I needed to modify compile flags (or any property for that matter) for a target.
Constraints:
- Without modifying the source code so that I don't accidentally check it in/ have to maintain a patch to be applied after every git pull
cmake -C ../my_script.cmake -B ../build doesn't work since targets don't exist at the beginning.
This new option is similar to the postinstall script
Option: https://developer.blender.org/diffusion/B/browse/master/CMakeLists.txt;743b9c5e1d9e9d23b8f51fd6778db8292de204ae$705-706
Usage: https://developer.blender.org/diffusion/B/browse/master/source/creator/CMakeLists.txt;743b9c5e1d9e9d23b8f51fd6778db8292de204ae$1269-1271
Not checking if the file exists is intentional: better for automation instead of masking the error.