summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeCCompilerId.c.in
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/CMakeCCompilerId.c.in')
-rw-r--r--Modules/CMakeCCompilerId.c.in7
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"