diff --git a/Modules/CMakeCCompilerId.c.in b/Modules/CMakeCCompilerId.c.in index e9675ca62..d5ae00a5d 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"