From 0ccf21968a756a37765a650d4f1dd66f0b9331b2 Mon Sep 17 00:00:00 2001 From: jcdr428 Date: Sun, 23 Jan 2022 18:13:00 +0100 Subject: [PATCH] if(MSVC) add_definitions(-D_CRT_SECURE_NO_WARNINGS) To prevent compiler warnings on the unsafe/deprecated methods strcpy, strncpy, gmtime, localtime... gcc does not accept the safe _s method alternatives. --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3a25389..eaf429e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,6 +35,7 @@ endif() if(MSVC) add_compile_options("/utf-8") + add_definitions(-D_CRT_SECURE_NO_WARNINGS) endif() if(WIN32)