Just as a follow-up for the general community, this is a bug and can be tracked at:
https://gitlab.kitware.com/cmake/cmake/issues/19075 On Wed, Mar 20, 2019 at 2:46 PM Ron Olson <[email protected]> wrote: > > Hi all- > > As a way of introduction, I’m Ron, and I maintain Apple’s Swift > programming language package for Fedora. I’ve been tracking down a > build failure and I came across a weird issue using 3.14.0 that > doesn’t seem to be a problem on 3.12.1. If you copy a file to the same > location, it overwrites it with a zero byte file: > > [rolson@testn temp]$ cmake --version > cmake version 3.14.0 > > CMake suite maintained and supported by Kitware (kitware.com/cmake). > > [rolson@testn temp]$ echo "hello world" > foo.txt > > [rolson@testn temp]$ ls -lah > total 8.0K > drwxrwxr-x. 2 rolson rolson 21 Mar 20 16:39 . > drwx------. 9 rolson rolson 4.0K Mar 20 16:22 .. > -rw-rw-r--. 1 rolson rolson 12 Mar 20 16:39 foo.txt > > [rolson@testn temp]$ cmake -E copy foo.txt . > > [rolson@testn temp]$ ls -lah > total 4.0K > drwxrwxr-x. 2 rolson rolson 21 Mar 20 16:39 . > drwx------. 9 rolson rolson 4.0K Mar 20 16:22 .. > -rw-rw-r--. 1 rolson rolson 0 Mar 20 16:39 foo.txt > > I haven’t been able to find any documentation about whether this is > expected behavior or not; under 3.12.1 the result would be foo.txt would > remain untouched. > > If it’s a bug, I’ll file a report, but wanted to make sure it is > before I do so. > > Ron > > > > > > > > -- > > Powered by www.kitware.com > > Please keep messages on-topic and check the CMake FAQ at: > http://www.cmake.org/Wiki/CMake_FAQ > > Kitware offers various services to support the CMake community. For more > information on each offering, please visit: > > CMake Support: http://cmake.org/cmake/help/support.html > CMake Consulting: http://cmake.org/cmake/help/consulting.html > CMake Training Courses: http://cmake.org/cmake/help/training.html > > Visit other Kitware open-source projects at > http://www.kitware.com/opensource/opensource.html > > Follow this link to subscribe/unsubscribe: > https://cmake.org/mailman/listinfo/cmake -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake
