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/CMakeCCompilerId.c | |
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/CMakeCCompilerId.c')
-rw-r--r-- | Modules/CMakeCCompilerId.c | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/Modules/CMakeCCompilerId.c b/Modules/CMakeCCompilerId.c index 045b6ae..8b883c8 100644 --- a/Modules/CMakeCCompilerId.c +++ b/Modules/CMakeCCompilerId.c @@ -6,40 +6,50 @@ # define const #endif -static char const info_compiler[] = "INFO:compiler[" #if defined(__INTEL_COMPILER) || defined(__ICC) -"Intel" +#define _COMPILER_ID "Intel" + #elif defined(__BORLANDC__) -"Borland" +#define _COMPILER_ID "Borland" + #elif defined(__WATCOMC__) -"Watcom" +#define _COMPILER_ID "Watcom" + #elif defined(__SUNPRO_C) -"SunPro" +#define _COMPILER_ID "SunPro" + #elif defined(__HP_cc) -"HP" +#define _COMPILER_ID "HP" + #elif defined(__DECC) -"Compaq" +#define _COMPILER_ID "Compaq" + #elif defined(__IBMC__) -"VisualAge" +#define _COMPILER_ID "VisualAge" + #elif defined(__GNUC__) -"GNU" +#define _COMPILER_ID "GNU" + #elif defined(_MSC_VER) -"MSVC" +#define _COMPILER_ID "MSVC" + #elif defined(_COMPILER_VERSION) -"MIPSpro" +#define _COMPILER_ID "MIPSpro" /* This compiler is either not known or is too old to define an identification macro. Try to identify the platform and guess that it is the native compiler. */ #elif defined(__sgi) -"MIPSpro" +#define _COMPILER_ID "MIPSpro" + #elif defined(__hpux) || defined(__hpua) -"HP" +#define _COMPILER_ID "HP" #else /* unknown compiler */ -"" +#define _COMPILER_ID "" #endif -"]"; + +static char const info_compiler[] = "INFO:compiler[" _COMPILER_ID "]"; /* Include the platform identification source. */ #include "CMakePlatformId.h" |