aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cynapses.org>2011-01-02 19:13:07 +0100
committerAndreas Schneider <asn@cynapses.org>2011-01-02 19:35:53 +0100
commit2b6fa19fe5bda7eb4728aabaa42a3da28a8e8b0e (patch)
tree035be3c528d54db6f51c8633f34e31149175a29a /cmake
parent3f538b3ddd237c04ccdf774b6274bdbbdee0e6e7 (diff)
downloadlibssh-2b6fa19fe5bda7eb4728aabaa42a3da28a8e8b0e.tar.gz
libssh-2b6fa19fe5bda7eb4728aabaa42a3da28a8e8b0e.tar.xz
libssh-2b6fa19fe5bda7eb4728aabaa42a3da28a8e8b0e.zip
cmake: Fixed msvc posix warnings and unsecure functions.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/DefineCompilerFlags.cmake7
1 files changed, 5 insertions, 2 deletions
diff --git a/cmake/Modules/DefineCompilerFlags.cmake b/cmake/Modules/DefineCompilerFlags.cmake
index 176c340..d43c454 100644
--- a/cmake/Modules/DefineCompilerFlags.cmake
+++ b/cmake/Modules/DefineCompilerFlags.cmake
@@ -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)