Commit 8aac1747 authored by Alexander Neundorf's avatar Alexander Neundorf
Browse files

BUG: make compiler id detection (almost) work again with sdcc 2.8.0 RC1,

mail sent to Brad for the remaining issue
don't match
INFO:compiler[" COMPILER_ID "]
which appears in the assembler file generated from the C file by sdcc, but
make sure the first character after the [ is no double quote

Alex
parent a38a37f1
......@@ -161,17 +161,17 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
CMAKE_${lang}_COMPILER_ID_STRINGS LIMIT_COUNT 2 REGEX "INFO:")
SET(HAVE_COMPILER_TWICE 0)
FOREACH(info ${CMAKE_${lang}_COMPILER_ID_STRINGS})
IF("${info}" MATCHES ".*INFO:compiler\\[([^]]*)\\].*")
IF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
IF(COMPILER_ID)
SET(COMPILER_ID_TWICE 1)
ENDIF(COMPILER_ID)
STRING(REGEX REPLACE ".*INFO:compiler\\[([^]]*)\\].*" "\\1"
COMPILER_ID "${info}")
ENDIF("${info}" MATCHES ".*INFO:compiler\\[([^]]*)\\].*")
IF("${info}" MATCHES ".*INFO:platform\\[([^]]*)\\].*")
ENDIF("${info}" MATCHES ".*INFO:compiler\\[([^]\"]*)\\].*")
IF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
STRING(REGEX REPLACE ".*INFO:platform\\[([^]]*)\\].*" "\\1"
PLATFORM_ID "${info}")
ENDIF("${info}" MATCHES ".*INFO:platform\\[([^]]*)\\].*")
ENDIF("${info}" MATCHES ".*INFO:platform\\[([^]\"]*)\\].*")
ENDFOREACH(info)
# Check if a valid compiler and platform were found.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment