[cmake-commits] king committed CMakeCCompilerId.c.in 1.1 1.2
cmake-commits at cmake.org
cmake-commits at cmake.org
Mon Feb 25 18:47:21 EST 2008
Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv10166
Modified Files:
CMakeCCompilerId.c.in
Log Message:
ENH: Add support to C compiler identification for void return type from main. Cross-compilers for embedded platforms may require it.
Index: CMakeCCompilerId.c.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCCompilerId.c.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- CMakeCCompilerId.c.in 25 Feb 2008 14:23:14 -0000 1.1
+++ CMakeCCompilerId.c.in 25 Feb 2008 23:47:19 -0000 1.2
@@ -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"
More information about the Cmake-commits
mailing list