[CMake] Problem and proposed solution with cmake -E rename across devices

Clifford Yapp cliffyapp at gmail.com
Wed Aug 31 15:08:18 EDT 2011


Fair enough - I think I've worked around it now.  Sorry for the noise,
I missed the save volume restriction on rename originally.

Cheers,
CY

On Wed, Aug 31, 2011 at 11:49 AM, David Cole <david.cole at kitware.com> wrote:
> The cmake -E rename command is documented to work only when src and
> dst are on the same volume:
>
> If you run "cmake -E" with no other args, the rename command is documented as:
>
>  rename oldname newname    - rename a file or directory (on one volume)
>
> I think doing a copy as a fallback is a reasonable thing, but I think
> it's on your side of the fence. CMake properly returns an error and
> tells you "can't do that rename operation" and then it should be uo to
> you to make a copy if that's what you want.
>
> Others may want to do something else if rename cannot be done. I don't
> think we should add code that says CMake will do a copy if rename
> fails...
>
>
> On Tue, Aug 30, 2011 at 3:21 PM, Clifford Yapp <cliffyapp at gmail.com> wrote:
>> We've run into an issue with cmake -E rename where the rename fails
>> due to rename() throwing EXDEV when done between devices (different
>> partitions, nfs to local, etc).  Erik Greenwald has investigated and
>> has proposed a fix to allow cmake -E rename to succeed across devices
>> - if possible we'd like to get this or some related fix included,
>> since this is a real-world build environment situation for us:
>>
>> http://public.kitware.com/Bug/view.php?id=12433
>>
>> Cheers, and thanks!
>>
>> CY
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>


More information about the CMake mailing list