[CMake] CHECK_FUNCTION_EXISTS and -Werror

Mathieu Malaterre mathieu.malaterre at gmail.com
Fri Dec 5 05:54:22 EST 2008


'lo there,

  I had my CFLAGS set to -Werror, and because of that a try compile failed with:

Run Build Command:/usr/bin/make "cmTryCompileExec/fast"
/usr/bin/make -f CMakeFiles/cmTryCompileExec.dir/build.make
CMakeFiles/cmTryCompileExec.dir/build
make[1]: Entering directory
`/home/mmalaterre/Projects/gdcm/foo/CMakeFiles/CMakeTmp'
/usr/bin/cmake -E cmake_progress_report
/home/mmalaterre/Projects/gdcm/foo/CMakeFiles/CMakeTmp/CMakeFiles 1
Building C object CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o
/usr/bin/gcc   -Werror   -DCHECK_FUNCTION_EXISTS=strncasecmp   -o
CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o   -c
/usr/share/cmake-2.6/Modules/CheckFunctionExists.c
cc1: warnings being treated as errors
/usr/share/cmake-2.6/Modules/CheckFunctionExists.c:3: warning:
conflicting types for built-in function 'strncasecmp'
make[1]: *** [CMakeFiles/cmTryCompileExec.dir/CheckFunctionExists.c.o] Error 1
make[1]: Leaving directory
`/home/mmalaterre/Projects/gdcm/foo/CMakeFiles/CMakeTmp'
make: *** [cmTryCompileExec/fast] Error 2


  Does this means strncasecmp is some kinf of function known by the
gcc compiler ?

Thanks
-Mathieu


More information about the CMake mailing list