mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-29 18:51:05 -05:00
ab26d334bf
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