COMP: More warnings and hp issues
This commit is contained in:
parent
45d85c2e34
commit
e49b93989d
@ -11,7 +11,14 @@ IF(NOT CMAKE_C_COMPILER_WORKS)
|
|||||||
"# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n"
|
"# error \"The CMAKE_C_COMPILER is set to a C++ compiler\"\n"
|
||||||
"#endif\n"
|
"#endif\n"
|
||||||
"#include <stdio.h>\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}
|
TRY_COMPILE(CMAKE_C_COMPILER_WORKS ${CMAKE_BINARY_DIR}
|
||||||
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testCCompiler.c
|
||||||
OUTPUT_VARIABLE OUTPUT)
|
OUTPUT_VARIABLE OUTPUT)
|
||||||
|
16
bootstrap
16
bootstrap
@ -536,19 +536,13 @@ fi
|
|||||||
# Check if C compiler works
|
# Check if C compiler works
|
||||||
TMPFILE=`cmake_tmp_file`
|
TMPFILE=`cmake_tmp_file`
|
||||||
cat > "${TMPFILE}.c" <<EOF
|
cat > "${TMPFILE}.c" <<EOF
|
||||||
#include<stdio.h>
|
#ifdef __cplusplus
|
||||||
#if defined(__hpux) && !defined(__GNUC__)
|
# error "The CMAKE_C_COMPILER is set to a C++ compiler"
|
||||||
# if defined(__CLASSIC_C__)
|
|
||||||
/* No ansi option given. */
|
|
||||||
# define bootstrap_require_no_prototype
|
|
||||||
# elif defined(__STDC_EXT__)
|
|
||||||
/* Option -Ae given. */
|
|
||||||
# else
|
|
||||||
/* Option -Aa given. */
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef bootstrap_require_no_prototype
|
#include<stdio.h>
|
||||||
|
|
||||||
|
#if defined(__CLASSIC_C__)
|
||||||
int main(argc, argv)
|
int main(argc, argv)
|
||||||
int argc;
|
int argc;
|
||||||
char* argv[];
|
char* argv[];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user