diff options
author | Brad King <brad.king@kitware.com> | 2008-02-25 23:47:19 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-02-25 23:47:19 (GMT) |
commit | 83c5f1b3f0941f6b817d3342b87ddb9a825c8174 (patch) | |
tree | edda1a86eff66cb986fcb478d661eb2a93d66e80 /Modules | |
parent | 0a9f041d2f8ecf5514640e451d758a4fa14c8bd5 (diff) | |
download | CMake-83c5f1b3f0941f6b817d3342b87ddb9a825c8174.zip CMake-83c5f1b3f0941f6b817d3342b87ddb9a825c8174.tar.gz CMake-83c5f1b3f0941f6b817d3342b87ddb9a825c8174.tar.bz2 |
ENH: Add support to C compiler identification for void return type from main. Cross-compilers for embedded platforms may require it.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/CMakeCCompilerId.c.in | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index e9675ca..d5ae00a 100644 --- a/Modules/CMakeCCompilerId.c.in +++ b/Modules/CMakeCCompilerId.c.in @@ -3,7 +3,14 @@ #endif /* Provide main() so the program can link. */ +#if defined(__18CXX) +# define ID_VOID_MAIN +#endif +#ifdef ID_VOID_MAIN +void main() {} +#else int main() { return 0; } +#endif #if defined(__INTEL_COMPILER) || defined(__ICC) # define COMPILER_ID "Intel" |