[CMake] Problem with CHECK_FUNCTION_EXISTS and strcasecmp
Michael Surette
mjsurette at gmail.com
Sat Mar 13 12:17:33 EST 2010
I am updating the CMake build files for a cross-platform project. One
of the tests is for strcasecmp for which I use CHECK_FUNCTION_EXISTS.
If it's not found the code generates its own function by that name.
This works well with GCC under Linux, including cross-compiling with
MinGW, as well as MinGW under Windows.
Testing this with MSVS 2008 Express under Windows XP, it fails to find
the function but gives errors and fails when I try to build.
If I manually edit the config.h file generated by CMake so that it
misreports that there is a strcasecmp function available it compiles well.
My conclusion is that either this function exists or a macro is defining
it, but it's not being found by CHECK_FUNCTION_EXISTS. I've greped
through the header files, but find no reference to it.
How can I find this function reliably?
Mike
More information about the CMake
mailing list