diff options
author | Chris Robinson <[email protected]> | 2008-01-14 16:30:18 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-01-14 16:30:18 -0800 |
commit | 16fb3f6db5fe287e173cab02203b11122cc02aaa (patch) | |
tree | 397cc8ec9bd77329b7006a14f67685f1753dd04b /CMakeLists.txt | |
parent | a2e25226125ff12b5294055dd01e247197270265 (diff) |
Check for strncasecmp or _strnicmp
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 18f9a365..0520e240 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -108,6 +108,16 @@ IF(NOT "${HAVE_STRCASECMP}") ADD_DEFINITIONS(-Dstrcasecmp=_stricmp) ENDIF() +CHECK_FUNCTION_EXISTS(strncasecmp HAVE_STRNCASECMP) +IF(NOT "${HAVE_STRNCASECMP}") + CHECK_FUNCTION_EXISTS(_strnicmp HAVE__STRNICMP) + IF(NOT "${HAVE__STRNICMP}") + MESSAGE(FATAL_ERROR "No case-insensitive size-limitted compare function found, please report!") + ENDIF() + + ADD_DEFINITIONS(-Dstrncasecmp=_strnicmp) +ENDIF() + CHECK_FUNCTION_EXISTS(snprintf HAVE_SNPRINTF) IF(NOT "${HAVE_SNPRINTF}") CHECK_FUNCTION_EXISTS(_snprintf HAVE__SNPRINTF) |