Browse Source

ENH: Check _SGI_COMPILER_VERSION for compiler id

Some SGI compilers define _SGI_COMPILER_VERSION in addition to the old
_COMPILER_VERSION preprocessor symbol.  It is more distinctive, so we
should check it in case the old one is ever removed.
Brad King 16 years ago
parent
commit
69e366f49b

+ 1 - 1
Modules/CMakeCCompilerId.c.in

@@ -52,7 +52,7 @@
 #elif defined(SDCC)
 #elif defined(SDCC)
 # define COMPILER_ID "SDCC"
 # define COMPILER_ID "SDCC"
 
 
-#elif defined(_COMPILER_VERSION)
+#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
 # define COMPILER_ID "MIPSpro"
 # define COMPILER_ID "MIPSpro"
 
 
 /* This compiler is either not known or is too old to define an
 /* This compiler is either not known or is too old to define an

+ 1 - 1
Modules/CMakeCXXCompilerId.cpp.in

@@ -43,7 +43,7 @@
    SHARC (21000) DSPs */
    SHARC (21000) DSPs */
 # define COMPILER_ID "ADSP"
 # define COMPILER_ID "ADSP"
 
 
-#elif defined(_COMPILER_VERSION)
+#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
 # define COMPILER_ID "MIPSpro"
 # define COMPILER_ID "MIPSpro"
 
 
 /* This compiler is either not known or is too old to define an
 /* This compiler is either not known or is too old to define an

+ 1 - 1
Modules/CMakeFortranCompilerId.F.in

@@ -12,7 +12,7 @@
         PRINT *, 'INFO:compiler[VisualAge]'
         PRINT *, 'INFO:compiler[VisualAge]'
 #elif defined(__PGI)
 #elif defined(__PGI)
         PRINT *, 'INFO:compiler[PGI]'
         PRINT *, 'INFO:compiler[PGI]'
-#elif defined(_COMPILER_VERSION)
+#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION)
         PRINT *, 'INFO:compiler[MIPSpro]'
         PRINT *, 'INFO:compiler[MIPSpro]'
 #       if 0
 #       if 0
 !       This compiler is either not known or is too old to define an
 !       This compiler is either not known or is too old to define an