summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeTestCCompiler.cmake
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-07-26 18:10:14 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-07-26 18:10:14 (GMT)
commite49b93989dbf67b87c84fe3a1516b0d9bf6aab9d (patch)
tree50152af3d77c72a9b367c81f0fe37d2fa5db05c8 /Modules/CMakeTestCCompiler.cmake
parent45d85c2e341dea5de0348273b70c027bd918a45f (diff)
downloadCMake-e49b93989dbf67b87c84fe3a1516b0d9bf6aab9d.zip
CMake-e49b93989dbf67b87c84fe3a1516b0d9bf6aab9d.tar.gz
CMake-e49b93989dbf67b87c84fe3a1516b0d9bf6aab9d.tar.bz2
COMP: More warnings and hp issues
Diffstat (limited to 'Modules/CMakeTestCCompiler.cmake')
-rw-r--r--Modules/CMakeTestCCompiler.cmake9
1 files changed, 8 insertions, 1 deletions
diff --git a/Modules/CMakeTestCCompiler.cmake b/Modules/CMakeTestCCompiler.cmake
index 9b9a51a..639baee 100644
--- a/Modules/CMakeTestCCompiler.cmake
+++ b/Modules/CMakeTestCCompiler.cmake
@@ -11,7 +11,14 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
"# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n"
"#endif\n"
"#include <stdio.h>\n"
- "int main(int argc, char* argv[]){ printf(\"%s\\n\", argv[0]); return argc-1;}\n")
+ "#if defined(__CLASSIC_C__)\n"
+ "int main(argc, argv)\n"
+ " int argc;\n"
+ " char* argv[];\n"
+ "#else\n"
+ "int main(int argc, char* argv[])\n"
+ "#endif\n"
+ "{ printf(\"%s\\n\", argv[0]); return argc-1;}\n")
TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
OUTPUT_VARIABLE OUTPUT)