mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 19:30:13 -06:00
First, use `cmGeneratedFileStream` to avoid touching an existing file unless its contents change and to get atomic replacement. Also add a scope to ensure that the file is in place (at `fout`'s destructor) before doing anything with the packaging scripts. See: https://discourse.cmake.org/t/1773