Use built-in cmake compare_files function rather than GNU cmp (which isn't natively available on Windows)


git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@277 632fc199-4ca6-4c93-a231-07263d6284db
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 22a9f84..3a01fde 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -176,63 +176,63 @@
 enable_testing()
 add_test(jpegut jpegut)
 add_test(cjpeg-int sharedlib/cjpeg -dct int -outfile testoutint.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm)
-add_test(cjpeg-int-cmp cmp ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutint.jpg)
+add_test(cjpeg-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutint.jpg)
 add_test(cjpeg-fast sharedlib/cjpeg -dct fast -opt -outfile testoutfst.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm)
-add_test(cjpeg-fast-cmp cmp ${CMAKE_SOURCE_DIR}/testimgfst.jpg testoutfst.jpg)
+add_test(cjpeg-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst.jpg testoutfst.jpg)
 add_test(cjpeg-float sharedlib/cjpeg -dct float -outfile testoutflt.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm)
 if(WITH_SIMD)
-add_test(cjpeg-float-cmp cmp ${CMAKE_SOURCE_DIR}/testimgflt.jpg testoutflt.jpg)
+add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt.jpg testoutflt.jpg)
 else()
-add_test(cjpeg-float-cmp cmp ${CMAKE_SOURCE_DIR}/testimgflt-nosimd.jpg testoutflt.jpg)
+add_test(cjpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt-nosimd.jpg testoutflt.jpg)
 endif()
 add_test(djpeg-int sharedlib/djpeg -dct int -fast -ppm -outfile testoutint.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg)
-add_test(djpeg-int-cmp cmp ${CMAKE_SOURCE_DIR}/testimgint.ppm testoutint.ppm)
+add_test(djpeg-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.ppm testoutint.ppm)
 add_test(djpeg-fast sharedlib/djpeg -dct fast -ppm -outfile testoutfst.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg)
-add_test(djpeg-fast-cmp cmp ${CMAKE_SOURCE_DIR}/testimgfst.ppm testoutfst.ppm)
+add_test(djpeg-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst.ppm testoutfst.ppm)
 add_test(djpeg-float sharedlib/djpeg -dct float -ppm -outfile testoutflt.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg)
 if(WITH_SIMD)
-add_test(djpeg-float-cmp cmp ${CMAKE_SOURCE_DIR}/testimgflt.ppm testoutflt.ppm)
+add_test(djpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt.ppm testoutflt.ppm)
 else()
-add_test(djpeg-float-cmp cmp ${CMAKE_SOURCE_DIR}/testorig.ppm testoutflt.ppm)
+add_test(djpeg-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testorig.ppm testoutflt.ppm)
 endif()
 add_test(djpeg-256 sharedlib/djpeg -dct int -bmp -colors 256 -outfile testout.bmp  ${CMAKE_SOURCE_DIR}/testorig.jpg)
-add_test(djpeg-256-cmp cmp ${CMAKE_SOURCE_DIR}/testimg.bmp testout.bmp)
+add_test(djpeg-256-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimg.bmp testout.bmp)
 add_test(cjpeg-prog sharedlib/cjpeg -dct int -progressive -outfile testoutp.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm)
-add_test(cjpeg-prog-cmp cmp ${CMAKE_SOURCE_DIR}/testimgp.jpg testoutp.jpg)
+add_test(cjpeg-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgp.jpg testoutp.jpg)
 add_test(jpegtran-prog sharedlib/jpegtran -outfile testoutt.jpg testoutp.jpg)
-add_test(jpegtran-prog-cmp cmp ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutt.jpg)
+add_test(jpegtran-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutt.jpg)
 add_test(jpegtran-crop sharedlib/jpegtran -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg ${CMAKE_SOURCE_DIR}/testorig.jpg)
-add_test(jpegtran-crop-cmp cmp ${CMAKE_SOURCE_DIR}/testimgcrop.jpg testoutcrop.jpg)
+add_test(jpegtran-crop-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgcrop.jpg testoutcrop.jpg)
 
 add_test(jpegut-static jpegut-static)
 add_test(cjpeg-static-int cjpeg-static -dct int -outfile testoutint.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm)
-add_test(cjpeg-static-int-cmp cmp ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutint.jpg)
+add_test(cjpeg-static-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutint.jpg)
 add_test(cjpeg-static-fast cjpeg-static -dct fast -opt -outfile testoutfst.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm)
-add_test(cjpeg-static-fast-cmp cmp ${CMAKE_SOURCE_DIR}/testimgfst.jpg testoutfst.jpg)
+add_test(cjpeg-static-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst.jpg testoutfst.jpg)
 add_test(cjpeg-static-float cjpeg-static -dct float -outfile testoutflt.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm)
 if(WITH_SIMD)
-add_test(cjpeg-static-float-cmp cmp ${CMAKE_SOURCE_DIR}/testimgflt.jpg testoutflt.jpg)
+add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt.jpg testoutflt.jpg)
 else()
-add_test(cjpeg-static-float-cmp cmp ${CMAKE_SOURCE_DIR}/testimgflt-nosimd.jpg testoutflt.jpg)
+add_test(cjpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt-nosimd.jpg testoutflt.jpg)
 endif()
 add_test(djpeg-static-int djpeg-static -dct int -fast -ppm -outfile testoutint.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg)
-add_test(djpeg-static-int-cmp cmp ${CMAKE_SOURCE_DIR}/testimgint.ppm testoutint.ppm)
+add_test(djpeg-static-int-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.ppm testoutint.ppm)
 add_test(djpeg-static-fast djpeg-static -dct fast -ppm -outfile testoutfst.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg)
-add_test(djpeg-static-fast-cmp cmp ${CMAKE_SOURCE_DIR}/testimgfst.ppm testoutfst.ppm)
+add_test(djpeg-static-fast-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgfst.ppm testoutfst.ppm)
 add_test(djpeg-static-float djpeg-static -dct float -ppm -outfile testoutflt.ppm ${CMAKE_SOURCE_DIR}/testorig.jpg)
 if(WITH_SIMD)
-add_test(djpeg-static-float-cmp cmp ${CMAKE_SOURCE_DIR}/testimgflt.ppm testoutflt.ppm)
+add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgflt.ppm testoutflt.ppm)
 else()
-add_test(djpeg-static-float-cmp cmp ${CMAKE_SOURCE_DIR}/testorig.ppm testoutflt.ppm)
+add_test(djpeg-static-float-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testorig.ppm testoutflt.ppm)
 endif()
 add_test(djpeg-static-256 djpeg-static -dct int -bmp -colors 256 -outfile testout.bmp  ${CMAKE_SOURCE_DIR}/testorig.jpg)
-add_test(djpeg-static-256-cmp cmp ${CMAKE_SOURCE_DIR}/testimg.bmp testout.bmp)
+add_test(djpeg-static-256-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimg.bmp testout.bmp)
 add_test(cjpeg-static-prog cjpeg-static -dct int -progressive -outfile testoutp.jpg ${CMAKE_SOURCE_DIR}/testorig.ppm)
-add_test(cjpeg-static-prog-cmp cmp ${CMAKE_SOURCE_DIR}/testimgp.jpg testoutp.jpg)
+add_test(cjpeg-static-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgp.jpg testoutp.jpg)
 add_test(jpegtran-static-prog jpegtran-static -outfile testoutt.jpg testoutp.jpg)
-add_test(jpegtran-static-prog-cmp cmp ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutt.jpg)
+add_test(jpegtran-static-prog-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgint.jpg testoutt.jpg)
 add_test(jpegtran-static-crop jpegtran-static -crop 120x90+20+50 -transpose -perfect -outfile testoutcrop.jpg ${CMAKE_SOURCE_DIR}/testorig.jpg)
-add_test(jpegtran-static-crop-cmp cmp ${CMAKE_SOURCE_DIR}/testimgcrop.jpg testoutcrop.jpg)
+add_test(jpegtran-static-crop-cmp ${CMAKE_COMMAND} -E compare_files ${CMAKE_SOURCE_DIR}/testimgcrop.jpg testoutcrop.jpg)
 
 
 #