build: Fix Visual Studio warnings.
authorAndreas Schneider <asn@cryptomilk.org>
Tue, 31 May 2011 19:08:32 +0000 (21:08 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 31 May 2011 19:10:11 +0000 (21:10 +0200)
cmake/Modules/DefineCompilerFlags.cmake

index 4c88d18..3a6a454 100644 (file)
@@ -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)