summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-05-24 08:33:05 -0400
committerAlexander Neundorf <neundorf@kde.org>2007-05-24 08:33:05 -0400
commite10e3bc86edd3b319f036a5e33a428863d0e91f8 (patch)
tree172132fed15e8444e0366222166dcf8732551c4f /Modules
parent1835c327fffd646b829e25f44694b93bb25f06f0 (diff)
downloadcmake-e10e3bc86edd3b319f036a5e33a428863d0e91f8.tar.gz
ENH: add compiler id for IAR compiler (http://www.iar.com/)
ENH: don't run endian test again if the variable is already set Alex
Diffstat (limited to 'Modules')
-rw-r--r--Modules/CMakeCCompilerId.c4
-rw-r--r--Modules/CMakeDetermineCCompiler.cmake1
-rw-r--r--Modules/TestBigEndian.cmake4
3 files changed, 9 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c b/Modules/CMakeCCompilerId.c
index ae9e188fcf..e5250f61eb 100644
--- a/Modules/CMakeCCompilerId.c
+++ b/Modules/CMakeCCompilerId.c
@@ -33,6 +33,10 @@
#elif defined(_MSC_VER)
# define COMPILER_ID "MSVC"
+/*IAR Systems compiler for embedded systems, beside this id not yet supported*/
+#elif defined(__IAR_SYSTEMS_ICC__)
+# define COMPILER_ID "IAR"
+
#elif defined(_COMPILER_VERSION)
# define COMPILER_ID "MIPSpro"
diff --git a/Modules/CMakeDetermineCCompiler.cmake b/Modules/CMakeDetermineCCompiler.cmake
index b3c7c6cfaa..9e68b80d14 100644
--- a/Modules/CMakeDetermineCCompiler.cmake
+++ b/Modules/CMakeDetermineCCompiler.cmake
@@ -97,6 +97,7 @@ ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
# if we have a MS cross compiler, it usually has a suffix, like
# e.g. clarm.exe or clmips.exe. Use this suffix for the CXX compiler too.
+# the same is true e.g. for the IAR cross compiler, which is "icc<suffix>"
IF (NOT _CMAKE_TOOLCHAIN_SUFFIX)
GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
IF (COMPILER_BASENAME MATCHES "^cl(.+)\\.exe$")
diff --git a/Modules/TestBigEndian.cmake b/Modules/TestBigEndian.cmake
index 021b9a67cd..b1a65bf26b 100644
--- a/Modules/TestBigEndian.cmake
+++ b/Modules/TestBigEndian.cmake
@@ -5,6 +5,8 @@
#
MACRO(TEST_BIG_ENDIAN VARIABLE)
+ SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS 1)
+ IF(NOT DEFINED ${VARIABLE})
IF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
TRY_RUN(${VARIABLE} HAVE_${VARIABLE}
${CMAKE_BINARY_DIR}
@@ -34,4 +36,6 @@ MACRO(TEST_BIG_ENDIAN VARIABLE)
MESSAGE("Check if the system is big endian - failed")
ENDIF(HAVE_${VARIABLE})
ENDIF("HAVE_${VARIABLE}" MATCHES "^HAVE_${VARIABLE}$")
+ ENDIF(NOT DEFINED ${VARIABLE})
+ SET(CMAKE_ALLOW_UNKNOWN_VARIABLE_READ_ACCESS)
ENDMACRO(TEST_BIG_ENDIAN)