[CMake] cmake -E compare_files - end of line character

Chris Hillery chillery-cmake at lambda.nu
Wed Sep 15 11:31:41 EDT 2010


It would be nice if compare_files did this, but really this is a problem
that should be handled by your source-control system, I think. Subversion,
for example, will ensure that text files are checked out with
locally-appropriate line endings, at least if you ask it nicely. I'm pretty
sure the same is true of Perforce and probably other systems.

Ceej
aka Chris Hillery

On Wed, Sep 15, 2010 at 1:40 AM, Olivier Pierard <olivier.pierard at cenaero.be
> wrote:

> Dear all,
>
> For several testcases validations, I use 'cmake -E compare_files'
> command on a result file against a reference file.  Problem is that
> result file might be generated on several different platforms while
> reference file is the same for all platforms.  Unfortunately, there is
> no option in cmake -E compare_files to ignore end of line characters on
> the contrary to diff, winmerge,...  The current solution is to call an
> 'home-made' unix2dos C++ function or call a configure_file() command to
> set correctly eol accoreding to the platform for the reference file so
> that compare_files gives the correct answer.
>
> Is there a way to avoid this 'stupid' solution ?  Is it useful to submit
> a development request for this feature ?
>
> Thanks for your help,
>
> Olivier
>
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100915/a287044c/attachment.htm>


More information about the CMake mailing list