build: Fix Visual Studio warnings.
This commit is contained in:
parent
c0d1b69a2f
commit
8e41ffb9b5
|
@ -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} -nologo -D_CRT_SECURE_NO_WARNINGS -D_WIN32_WINNT=0x501")
|
||||
# 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)
|
||||
|
|
Loading…
Reference in New Issue