diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-05-25 20:46:50 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-05-25 20:46:50 (GMT) |
commit | 55f11b348bdfd94f28c95cea2e72a79fa1a1fc5d (patch) | |
tree | 550118d0573f523740fad14fdd0c55875aec5fa5 /Modules/CMakeDetermineCompilerId.cmake | |
parent | d6f779a9b0abf2a00119c9ab9ab73e360ba1bf7f (diff) | |
download | CMake-55f11b348bdfd94f28c95cea2e72a79fa1a1fc5d.zip CMake-55f11b348bdfd94f28c95cea2e72a79fa1a1fc5d.tar.gz CMake-55f11b348bdfd94f28c95cea2e72a79fa1a1fc5d.tar.bz2 |
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
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r-- | Modules/CMakeDetermineCompilerId.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake index f0fce8f..e30db35 100644 --- a/Modules/CMakeDetermineCompilerId.cmake +++ b/Modules/CMakeDetermineCompilerId.cmake @@ -76,6 +76,8 @@ MACRO(CMAKE_DETERMINE_COMPILER_ID lang flagvar src) "${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:") |