Skip to content

Commit

Permalink
prevent libssh build error C4996
Browse files Browse the repository at this point in the history
  • Loading branch information
AlwinEsch committed Mar 28, 2020
1 parent 5c55584 commit e67c19f
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions depends/common/libssh/10-prevent-error-C4996.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
From d3ea7a06200023159f122582b60c5d2139be26d9 Mon Sep 17 00:00:00 2001
From: Alwin Esch <alwin.esch@web.de>
Date: Sat, 28 Mar 2020 22:25:32 +0100
Subject: [PATCH] prevent error C4996

---
CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e603c2..7a09f5d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,6 +42,11 @@ macro_ensure_out_of_source_build("${PROJECT_NAME} requires an out of source buil
# Copy library files to a lib sub-directory
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")

+# Prevent "error C4996: ..." on windows builds
+if (WIN32)
+ add_compile_options(/wd4996)
+endif()
+
# search for libraries
if (WITH_ZLIB)
find_package(ZLIB REQUIRED)
--
2.20.1

0 comments on commit e67c19f

Please sign in to comment.