From 69e366f49bba3ef4eb2019db5e06f265549b6515 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 14 Jul 2009 15:17:21 -0400 Subject: [PATCH] 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. --- Modules/CMakeCCompilerId.c.in | 2 +- Modules/CMakeCXXCompilerId.cpp.in | 2 +- Modules/CMakeFortranCompilerId.F.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index 35d7df77a8..7a0a39de1e 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -52,7 +52,7 @@ #elif defined(SDCC) # define COMPILER_ID "SDCC" -#elif defined(_COMPILER_VERSION) +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) # define COMPILER_ID "MIPSpro" /* This compiler is either not known or is too old to define an diff --git a/Modules/CMakeCXXCompilerId.cpp.in b/Modules/CMakeCXXCompilerId.cpp.in index fa2178c0b9..77a6247c3d 100644 --- a/Modules/CMakeCXXCompilerId.cpp.in +++ b/Modules/CMakeCXXCompilerId.cpp.in @@ -43,7 +43,7 @@ SHARC (21000) DSPs */ # define COMPILER_ID "ADSP" -#elif defined(_COMPILER_VERSION) +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) # define COMPILER_ID "MIPSpro" /* This compiler is either not known or is too old to define an diff --git a/Modules/CMakeFortranCompilerId.F.in b/Modules/CMakeFortranCompilerId.F.in index a01dc81155..63d3e438d1 100644 --- a/Modules/CMakeFortranCompilerId.F.in +++ b/Modules/CMakeFortranCompilerId.F.in @@ -12,7 +12,7 @@ PRINT *, 'INFO:compiler[VisualAge]' #elif defined(__PGI) PRINT *, 'INFO:compiler[PGI]' -#elif defined(_COMPILER_VERSION) +#elif defined(_SGI_COMPILER_VERSION) || defined(_COMPILER_VERSION) PRINT *, 'INFO:compiler[MIPSpro]' # if 0 ! This compiler is either not known or is too old to define an