[cmake-developers] Cross platform test for comparing two text files

Eric Noulard eric.noulard at gmail.com
Thu Jul 28 13:23:31 EDT 2011


2011/7/28 Ali Ghayoor <alii.ghayoor at gmail.com>:
> Hello All,
>
> I use cmake 2.8.5, and I want to make a test by the cmake which compares an
> output text file with a baseline file. We use the "diff" command at the
> Linux to compare two text files, but it will not work at Windows operating
> systems.
>
> Does anyone know about the best cross platform way to compare two text files
> by the cmake?

cmake -E compare_files file1 file2

- check if file1 is same as file2


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org



More information about the cmake-developers mailing list