On Wed, Jul 8, 2009 at 11:22 PM, Alexander Neundorf<a.neundorf-w...@gmx.net> wrote: > On Wednesday 08 July 2009, Steven Van Ingelgem wrote: >> Hi, >> >> >> I tried this call: >> CHECK_FUNCTION_EXISTS(snprintf HAS_snprintf) >> >> >> Which results in this error being generated: >> C:\MinGW\bin\gcc.exe -g -ggdb -O0 -Wall -Werror >> -DCHECK_FUNCTION_EXISTS=snprintf -o >> CMakeFiles\cmTryCompileExec.dir\CheckFunctionExists.c.obj -c "C:\Program >> Files\CMake 2.7\share\cmake-2.7\Modules\CheckFunctionExists.c" >> cc1.exe: warnings being treated as errors >> C:\Program Files\CMake 2.7\share\cmake-2.7\Modules\CheckFunctionExists.c:3: >> error: conflicting types for built-in function 'snprintf' > > Did you try using check_symbol_exists() ?
Indeed. Ref: http://public.kitware.com/Bug/view.php?id=8246 Solution: INCLUDE(CheckSymbolExists) CHECK_SYMBOL_EXISTS(strcasecmp "strings.h" HAVE_STRCASECMP) CHECK_SYMBOL_EXISTS(strncasecmp "strings.h" HAVE_STRNCASECMP) CHECK_SYMBOL_EXISTS(snprintf "stdio.h" HAVE_SNPRINTF) 2cts -- Mathieu _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake