1 PROGRAM CMakeFortranCompilerId
2 ! Identify the compiler
3 #if defined(__INTEL_COMPILER) || defined(__ICC)
4 PRINT *, 'INFO:compiler[Intel]'
5 #elif defined(__SUNPRO_F90) || defined(__SUNPRO_F95)
6 PRINT *, 'INFO:compiler[SunPro]'
7 #elif defined(__GNUC__)
8 PRINT *, 'INFO:compiler[GNU]'
9 #elif defined(__IBM__) || defined(__IBMC__)
10 PRINT *, 'INFO:compiler[VisualAge]'
11 #elif defined(_COMPILER_VERSION)
12 PRINT *, 'INFO:compiler[MIPSpro]'
13 ! This compiler is either not known or is too old to define an
14 ! identification macro. Try to identify the platform and guess that
15 ! it is the native compiler.
16 #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
17 PRINT *, 'INFO:compiler[VisualAge]'
18 #elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
19 PRINT *, 'INFO:compiler[MIPSpro]'
20 #elif defined(__hpux) || defined(__hpux__)
21 PRINT *, 'INFO:compiler[HP]'
23 PRINT *, 'INFO:compiler[]'
26 ! Identify the platform
27 #if defined(__linux) || defined(__linux__) || defined(linux)
28 PRINT *, 'INFO:platform[Linux]'
29 #elif defined(__CYGWIN__)
30 PRINT *, 'INFO:platform[Cygwin]'
31 #elif defined(__MINGW32__)
32 PRINT *, 'INFO:platform[MinGW]'
33 #elif defined(__APPLE__)
34 PRINT *, 'INFO:platform[Darwin]'
35 #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
36 PRINT *, 'INFO:platform[Windows]'
37 #elif defined(__FreeBSD__) || defined(__FreeBSD)
38 PRINT *, 'INFO:platform[FreeBSD]'
39 #elif defined(__NetBSD__) || defined(__NetBSD)
40 PRINT *, 'INFO:platform[NetBSD]'
41 #elif defined(__OpenBSD__) || defined(__OPENBSD)
42 PRINT *, 'INFO:platform[OpenBSD]'
43 #elif defined(__sun) || defined(sun)
44 PRINT *, 'INFO:platform[SunOS]'
45 #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__)
46 PRINT *, 'INFO:platform[AIX]'
47 #elif defined(__sgi) || defined(__sgi__) || defined(_SGI)
48 PRINT *, 'INFO:platform[IRIX]'
49 #elif defined(__hpux) || defined(__hpux__)
50 PRINT *, 'INFO:platform[HP-UX]'
51 #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS)
52 PRINT *, 'INFO:platform[BeOS]'
53 #elif defined(__QNX__) || defined(__QNXNTO__)
54 PRINT *, 'INFO:platform[QNX]'
55 #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__)
56 PRINT *, 'INFO:platform[Tru64]'
57 #elif defined(__riscos) || defined(__riscos__)
58 PRINT *, 'INFO:platform[RISCos]'
59 #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__)
60 PRINT *, 'INFO:platform[SINIX]'
61 #elif defined(__UNIX_SV__)
62 PRINT *, 'INFO:platform[UNIX_SV]'
63 #elif defined(__bsdos__)
64 PRINT *, 'INFO:platform[BSDOS]'
65 #elif defined(_MPRAS) || defined(MPRAS)
66 PRINT *, 'INFO:platform[MP-RAS]'
67 #elif defined(__osf) || defined(__osf__)
68 PRINT *, 'INFO:platform[OSF1]'
69 #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv)
70 PRINT *, 'INFO:platform[SCO_SV]'
71 #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX)
72 PRINT *, 'INFO:platform[ULTRIX]'
73 #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX)
74 PRINT *, 'INFO:platform[Xenix]'
76 PRINT *, 'INFO:platform[]'