Browse Source

Add IAR to the CMakeDetectC(XX)CompilerID.c(pp).in

With the AVR IAR compiler this can't be found, but it works e.g. for the
ARM AVR compiler.

Alex
Alex Neundorf 14 years ago
parent
commit
d118b8b389
2 changed files with 8 additions and 4 deletions
  1. 3 4
      Modules/CMakeCCompilerId.c.in
  2. 5 0
      Modules/CMakeCXXCompilerId.cpp.in

+ 3 - 4
Modules/CMakeCCompilerId.c.in

@@ -160,10 +160,9 @@
 # define COMPILER_ID "ADSP"
 
 /* IAR Systems compiler for embedded systems.
-   http://www.iar.com
-   Not supported yet by CMake
-#elif defined(__IAR_SYSTEMS_ICC__)
-# define COMPILER_ID "IAR" */
+   http://www.iar.com */
+#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC)
+# define COMPILER_ID "IAR"
 
 /* sdcc, the small devices C compiler for embedded systems,
    http://sdcc.sourceforge.net  */

+ 5 - 0
Modules/CMakeCXXCompilerId.cpp.in

@@ -161,6 +161,11 @@
 #elif defined(__ADSPBLACKFIN__) || defined(__ADSPTS__) || defined(__ADSP21000__)
 # define COMPILER_ID "ADSP"
 
+/* IAR Systems compiler for embedded systems.
+   http://www.iar.com */
+#elif defined(__IAR_SYSTEMS_ICC__ ) || defined(__IAR_SYSTEMS_ICC)
+# define COMPILER_ID "IAR"
+
 #elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
 # define COMPILER_ID "MIPSpro"
 # if defined(_SGI_COMPILER_VERSION)