summaryrefslogtreecommitdiffstats
path: root/bootstrap
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-07-27 14:37:12 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-07-27 14:37:12 (GMT)
commit1756aa5780571879ffbc2f77c2ae04cc1953002b (patch)
tree2c0286ae08fc040f325aa67b53146ecca2a2207b /bootstrap
parentdbbe605e74981331368e171f87bbd0837aaceeb2 (diff)
downloadCMake-1756aa5780571879ffbc2f77c2ae04cc1953002b.zip
CMake-1756aa5780571879ffbc2f77c2ae04cc1953002b.tar.gz
CMake-1756aa5780571879ffbc2f77c2ae04cc1953002b.tar.bz2
ENH: move changes from main tree to branch
Diffstat (limited to 'bootstrap')
-rwxr-xr-xbootstrap17
1 files changed, 14 insertions, 3 deletions
diff --git a/bootstrap b/bootstrap
index 1fb6698..d6331df 100755
--- a/bootstrap
+++ b/bootstrap
@@ -536,11 +536,22 @@ fi
# Check if C compiler works
TMPFILE=`cmake_tmp_file`
cat > "${TMPFILE}.c" <<EOF
+#ifdef __cplusplus
+# error "The CMAKE_C_COMPILER is set to a C++ compiler"
+#endif
+
#include<stdio.h>
-int main()
+
+#if defined(__CLASSIC_C__)
+int main(argc, argv)
+ int argc;
+ char* argv[];
+#else
+int main(int argc, char* argv[])
+#endif
{
- printf("1\n");
- return 0;
+ printf("%d\n", (argv != 0));
+ return argc-1;
}
EOF
for a in ${cmake_c_compilers}; do