cmake: Fixed msvc posix warnings and unsecure functions.
Этот коммит содержится в:
родитель
3f538b3ddd
Коммит
2b6fa19fe5
@ -63,6 +63,9 @@ if (UNIX AND NOT WIN32)
|
||||
endif (UNIX AND NOT WIN32)
|
||||
|
||||
if (MSVC)
|
||||
# Suppress warning about "deprecated" functions
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
|
||||
# Use secure functions by defaualt and suppress warnings about
|
||||
#"deprecated" functions
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES=1")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_SECURE_CPP_OVERLOAD_STANDARD_NAMES_COUNT=1")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D _CRT_NONSTDC_NO_WARNINGS=1 /D _CRT_SECURE_NO_WARNINGS=1")
|
||||
endif (MSVC)
|
||||
|
@ -46,9 +46,6 @@
|
||||
# undef inline
|
||||
# define inline __inline
|
||||
|
||||
# undef strdup
|
||||
# define strdup _strdup
|
||||
|
||||
# define strcasecmp _stricmp
|
||||
# define strncasecmp _strnicmp
|
||||
# define strtoull _strtoui64
|
||||
@ -87,9 +84,6 @@
|
||||
# endif /* HAVE__VSNPRINTF */
|
||||
# endif /* HAVE__VSNPRINTF_S */
|
||||
|
||||
# ifndef HAVE_STRNCPY
|
||||
# define strncpy(d, s, n) strncpy_s((d), (n), (s), _TRUNCATE)
|
||||
# endif
|
||||
# endif /* _MSC_VER */
|
||||
|
||||
#else /* _WIN32 */
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user