diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-05-22 16:48:16 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-05-22 16:48:16 (GMT) |
commit | 6e2fd2c2cade2d8397dbdcd104d10654c2ff6c65 (patch) | |
tree | 80d10867c3f9f7ce441104808d284a913c16627f /Modules/CMakePlatformId.h | |
parent | bef8d3580b32987486c67cf0eed73fe3d11472d3 (diff) | |
download | CMake-6e2fd2c2cade2d8397dbdcd104d10654c2ff6c65.zip CMake-6e2fd2c2cade2d8397dbdcd104d10654c2ff6c65.tar.gz CMake-6e2fd2c2cade2d8397dbdcd104d10654c2ff6c65.tar.bz2 |
BUG: now the toolchain file is configured into the buildtree, otherwise e.g.
CMAKE_SOURCE_DIR can't be used there
ENH: modify CMakeCCompilerId.c and .h so that sdcc can compile them. As they
were the preprocessor produced:
9 "test.c"
static char const info_compiler[] = "INFO:compiler["
# 40 "test.c"
""
"]";
and the mixing of the preprocessing directives and the string constants
didn't work.
Alex
Diffstat (limited to 'Modules/CMakePlatformId.h')
-rw-r--r-- | Modules/CMakePlatformId.h | 78 |
1 files changed, 51 insertions, 27 deletions
diff --git a/Modules/CMakePlatformId.h b/Modules/CMakePlatformId.h index e7e0d50..8fb0982 100644 --- a/Modules/CMakePlatformId.h +++ b/Modules/CMakePlatformId.h @@ -1,54 +1,78 @@ /* Identify known platforms by name. */ -static char const info_platform[] = "INFO:platform[" #if defined(__linux) || defined(__linux__) || defined(linux) -"Linux" +#define _PLATFORM_ID "Linux" + #elif defined(__CYGWIN__) -"Cygwin" +#define _PLATFORM_ID "Cygwin" + #elif defined(__MINGW32__) -"MinGW" +#define _PLATFORM_ID "MinGW" + #elif defined(__APPLE__) -"Darwin" +#define _PLATFORM_ID "Darwin" + #elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32) -"Windows" +#define _PLATFORM_ID "Windows" + #elif defined(__FreeBSD__) || defined(__FreeBSD) -"FreeBSD" +#define _PLATFORM_ID "FreeBSD" + #elif defined(__NetBSD__) || defined(__NetBSD) -"NetBSD" +#define _PLATFORM_ID "NetBSD" + #elif defined(__OpenBSD__) || defined(__OPENBSD) -"OpenBSD" +#define _PLATFORM_ID "OpenBSD" + #elif defined(__sun) || defined(sun) -"SunOS" +#define _PLATFORM_ID "SunOS" + #elif defined(_AIX) || defined(__AIX) || defined(__AIX__) || defined(__aix) || defined(__aix__) -"AIX" +#define _PLATFORM_ID "AIX" + #elif defined(__sgi) || defined(__sgi__) || defined(_SGI) -"IRIX" +#define _PLATFORM_ID "IRIX" + #elif defined(__hpux) || defined(__hpux__) -"HP-UX" +#define _PLATFORM_ID "HP-UX" + #elif defined(__BeOS) || defined(__BEOS__) || defined(_BEOS) -"BeOS" +#define _PLATFORM_ID "BeOS" + #elif defined(__QNX__) || defined(__QNXNTO__) -"QNX" +#define _PLATFORM_ID "QNX" + #elif defined(__tru64) || defined(_tru64) || defined(__TRU64__) -"Tru64" +#define _PLATFORM_ID "Tru64" + #elif defined(__riscos) || defined(__riscos__) -"RISCos" +#define _PLATFORM_ID "RISCos" + #elif defined(__sinix) || defined(__sinix__) || defined(__SINIX__) -"SINIX" +#define _PLATFORM_ID "SINIX" + #elif defined(__UNIX_SV__) -"UNIX_SV" +#define _PLATFORM_ID "UNIX_SV" + #elif defined(__bsdos__) -"BSDOS" +#define _PLATFORM_ID "BSDOS" + #elif defined(_MPRAS) || defined(MPRAS) -"MP-RAS" +#define _PLATFORM_ID "MP-RAS" + #elif defined(__osf) || defined(__osf__) -"OSF1" +#define _PLATFORM_ID "OSF1" + #elif defined(_SCO_SV) || defined(SCO_SV) || defined(sco_sv) -"SCO_SV" +#define _PLATFORM_ID "SCO_SV" + #elif defined(__ultrix) || defined(__ultrix__) || defined(_ULTRIX) -"ULTRIX" +#define _PLATFORM_ID "ULTRIX" + #elif defined(__XENIX__) || defined(_XENIX) || defined(XENIX) -"Xenix" +#define _PLATFORM_ID "Xenix" + #else /* unknown platform */ -"" +#define _PLATFORM_ID "" + #endif -"]"; +static char const info_platform[] = "INFO:platform[" _PLATFORM_ID "]"; |