[cmake-commits] king committed CMakeLists.txt 1.23 1.24
cmake-commits at cmake.org
cmake-commits at cmake.org
Wed Jan 2 18:00:21 EST 2008
Update of /cvsroot/CMake/CMake/Tests/StringFileTest
In directory public:/mounts/ram/cvs-serv31899
Modified Files:
CMakeLists.txt
Log Message:
ENH: Add test for FILE(READ ...HEX).
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/StringFileTest/CMakeLists.txt,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- CMakeLists.txt 29 Aug 2007 16:01:58 -0000 1.23
+++ CMakeLists.txt 2 Jan 2008 23:00:19 -0000 1.24
@@ -16,6 +16,13 @@
"FILE(STRINGS) incorrectly read [${infile_strings}]")
ENDIF("${infile_strings}" STREQUAL "${infile_strings_goal}")
+# test reading a file and getting its binary data as hex string
+FILE(READ "${CMAKE_CURRENT_SOURCE_DIR}/main.srec" infilehex LIMIT 4 HEX)
+IF(NOT "${infilehex}" STREQUAL "53313036")
+ MESSAGE(SEND_ERROR
+ "FILE(READ ... HEX) error, read: \"${infilehex}\", expected \"53313036\"")
+ENDIF(NOT "${infilehex}" STREQUAL "53313036")
+
# test that FILE(STRINGS) also work with Intel hex and Motorola S-record files
# this file has been created with "sdcc main.c"
More information about the Cmake-commits
mailing list