Silence some MSVC security warnings by replacing strdup() with _strdup().

Backported from taglib2.
This commit is contained in:
Tsuda Kageyu
2015-11-13 10:06:01 +09:00
parent ec8e611909
commit 86c7e905ba
3 changed files with 53 additions and 13 deletions

View File

@ -190,6 +190,16 @@ if(NOT HAVE_VSNPRINTF)
" HAVE_VSPRINTF_S)
endif()
# Determine whether your compiler supports ISO _strdup.
check_cxx_source_compiles("
#include <cstring>
int main() {
_strdup(0);
return 0;
}
" HAVE_ISO_STRDUP)
# Check for libz using the cmake supplied FindZLIB.cmake
if(NOT ZLIB_SOURCE)