From f45ed446e9d99990f3eb54db366a72254111e9be Mon Sep 17 00:00:00 2001
From: Roger Leigh <[EMAIL REDACTED]>
Date: Sun, 29 May 2022 11:07:36 +0100
Subject: [PATCH] cmake: Add MSVC options when building all libraries and
executables
---
CMakeLists.txt | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 770b0fac..80c69bd5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,6 +131,10 @@ find_package(CMath REQUIRED)
# Release support
include(Release)
+if(MSVC)
+ add_compile_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS)
+ add_compile_options(/wd4996)
+endif()
# Process subdirectories
add_subdirectory(port)