[cmake-commits] alex committed CMakeLists.txt 1.21 1.22 main.ihx NONE
1.1 main.srec NONE 1.1
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri May 25 15:22:24 EDT 2007
Update of /cvsroot/CMake/CMake/Tests/StringFileTest
In directory public:/mounts/ram/cvs-serv1214/Tests/StringFileTest
Modified Files:
CMakeLists.txt
Added Files:
main.ihx main.srec
Log Message:
ENH: make the compiler id detection work, even if the output file name of
the compiler is completely unknown and even if it produces intel hex or
motorola s-record files, with test
Alex
--- NEW FILE: main.ihx ---
:03000000020003F8
:03005C0002005F40
:05005F0012006480FEA8
:010064002279
:0E006900494E464F3A636F6D70696C65725B6D
:0A007700534443432D4845585D00F3
:06003200E478FFF6D8FDA2
:080010007900E94400601B7A4D
:0500180000900081785A
:03001D000075A0CB
:0A00200000E493F2A308B800020503
:08002A00A0D9F4DAF275A0FF81
:080038007800E84400600A7939
:030040000075A0A8
:0600430000E4F309D8FC03
:080049007800E84400600C7926
:0B00510000900000E4F0A3D8FCD9FAF6
:03000300758107FD
:0A000600120065E582600302005F4E
:04006500758200227E
:00000001FF
--- NEW FILE: main.srec ---
S1060000020003F4
S106005C02005F3C
S108005F12006480FEA4
S10400642275
S1110069494E464F3A636F6D70696C65725B69
S10E0077534443432D535245435D00A6
S1090032E478FFF6D8FD9E
S10B00107900E94400601B7A49
S1080018009000827855
S106001D0075A0C7
S10D002000E493F2A308B8000205FF
S10B002AA0D9F4DAF275A0FF7D
S10B00387800E84400600A7935
S10600400075A0A4
S109004300E4F309D8FCFF
S10B00497800E84400600C7922
S10E005100900000E4F0A3D8FCD9FAF2
S1060003758107F9
S10D0006120065E582600302005F4A
S1070065758200227A
S9030000FC
Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/StringFileTest/CMakeLists.txt,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- CMakeLists.txt 27 Apr 2007 01:50:52 -0000 1.21
+++ CMakeLists.txt 25 May 2007 19:22:22 -0000 1.22
@@ -16,6 +16,28 @@
"FILE(STRINGS) incorrectly read [${infile_strings}]")
ENDIF("${infile_strings}" STREQUAL "${infile_strings_goal}")
+
+# test that FILE(STRINGS) also work with Intel hex and Motorola S-record files
+# this file has been created with "sdcc main.c"
+FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/main.ihx" infile_strings REGEX INFO)
+SET(infile_strings_goal "INFO:compiler\\[SDCC-HEX\\]")
+IF("${infile_strings}" MATCHES "${infile_strings_goal}")
+ MESSAGE("FILE(STRINGS) correctly read from hex file [${infile_strings}]")
+ELSE("${infile_strings}" MATCHES "${infile_strings_goal}")
+ MESSAGE(SEND_ERROR
+ "FILE(STRINGS) incorrectly read from hex file [${infile_strings}]")
+ENDIF("${infile_strings}" MATCHES "${infile_strings_goal}")
+
+# this file has been created with "sdcc main.c --out-fmt-s19"
+FILE(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/main.srec" infile_strings REGEX INFO)
+SET(infile_strings_goal "INFO:compiler\\[SDCC-SREC\\]")
+IF("${infile_strings}" MATCHES "${infile_strings_goal}")
+ MESSAGE("FILE(STRINGS) correctly read from srec file [${infile_strings}]")
+ELSE("${infile_strings}" MATCHES "${infile_strings_goal}")
+ MESSAGE(SEND_ERROR
+ "FILE(STRINGS) incorrectly read from srec file [${infile_strings}]")
+ENDIF("${infile_strings}" MATCHES "${infile_strings_goal}")
+
# String test
STRING(REGEX MATCH "[cC][mM][aA][kK][eE]" rmvar "CMake is great")
STRING(REGEX MATCHALL "[cC][mM][aA][kK][eE]" rmallvar "CMake is better than cmake or CMake")
More information about the Cmake-commits
mailing list