[cmake-commits] alex committed CMakeDetermineCompilerId.cmake 1.7 1.8
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri May 25 16:46:52 EDT 2007
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv21867/Modules
Modified Files:
CMakeDetermineCompilerId.cmake
Log Message:
ENH: add option to FILE(STRINGS NO_HEX_CONVERSION) to disable automatic
conversion of hex and srec files to binary.
Without this automatic conversion, everywhere where a compiled file is parsed for strings the
a file(HEX2BIN somefile binfile) command has to be added otherwise it will
not work for these compilers. I tried this with DetermineCompiler and
CheckTypeSize and nobody will do this except the users who work with such
compilers. For them it will break if they don't add this conversion command
in all these places.
If FILE(STRINGS) is used with a text file, it
will in most cases still work as expected, since it will only convert hex
and srec files. If a user actually wants to get text out of hex files, he
knows what he's doing and will see the hint in the documentation.
Anyway, it should work without having to create a temporary file, will work
on this later.
Alex
Index: CMakeDetermineCompilerId.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineCompilerId.cmake,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- CMakeDetermineCompilerId.cmake 25 May 2007 19:22:22 -0000 1.7
+++ CMakeDetermineCompilerId.cmake 25 May 2007 20:46:50 -0000 1.8
@@ -76,6 +76,8 @@
"${CMAKE_${lang}_COMPILER_ID_EXE}\"\n\n")
# only check if we don't have it yet
IF(NOT CMAKE_${lang}_COMPILER_ID)
+# SET(CMAKE_${lang}_COMPILER_ID_EXE "${CMAKE_${lang}_COMPILER_ID_DIR}/ConvertedToBinary")
+# FILE(HEX_TO_BIN "${CMAKE_${lang}_COMPILER_ID_EXE_TRY}" "${CMAKE_${lang}_COMPILER_ID_EXE}")
# Read the compiler identification string from the executable file.
FILE(STRINGS ${CMAKE_${lang}_COMPILER_ID_EXE}
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 2 REGEX "INFO:")
More information about the Cmake-commits
mailing list