Rsync would be no different than writing the file and using
copy_if_different; it would still be two steps, but require additional
things to be installed on linux and windows systems.  Same with
python/perl/bash as appropriate.  If you're using those other things
you should just use configure so windows people don't attempt to build
it with JUST cmake and their favorite compiler installed.

On Thu, May 30, 2013 at 9:11 AM, j s <[email protected]> wrote:
> You are entitled to your opinion, but there are several system
> utilities that are available by default on many systems, including
> rsync.  rsync has a well known interface, and is available by default
> on Linux and Mac OS X.  The way CMake does things is often kludgy and
> just feels wrong.  I often write scripts in more effective languages
> and then run from within CMake on Windows, Linux, and Mac OS X.  Perl
> and Python are often a much better way to go than trying to do
> everything in CMake.
>
>
> On Wed, May 29, 2013 at 11:14 PM, [email protected] <[email protected]> wrote:
>> ----- Reply message -----
>> From: "j s" <[email protected]>
>> To: "Michael Wild" <[email protected]>
>> Cc: "CMake mailing list" <[email protected]>
>> Subject: [CMake] write file if different?
>> Date: Wed, May 29, 2013 20:44
>>
>> On Wed, May 29, 2013 at 2:32 AM, Michael Wild <[email protected]> wrote:
>>>
>>> On 28.05.2013 22:07, Matthew Woehlke wrote:
>>> > Is there a built-in way to write a string to a file (a la FILE(WRITE))
>>> > that will only write the file if the content would be different? (Or
>>> > does FILE(WRITE) already work this way despite no obvious hint in the
>>> > documentation that it does?)
>>> >
>>> > Right now I am writing to a temporary file and running cmake -E
>>> > copy_if_different, then removing the temporary file, but this seems
>>> > inelegant and I am wondering if there is a better solution.
>>> >
>> You can always use the rsync command, which is available for all
>> systems, including Windows.
>>
>> That's probably the worst possible solution... CMake has everything that iy
>> required to accomplish this built-in, so adding a unnecessary dependency
>> that is only needed by the build system is a really bad idea...
> --
>
> 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
--

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

Reply via email to