From 513fffc96be5dbb1c2a5df83303abf2e42e348c5 Mon Sep 17 00:00:00 2001 From: kdex Date: Thu, 24 May 2018 06:23:06 +0200 Subject: [PATCH] CMake: Avoid non-compliant standard library extensions in MSVC --- CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index af8f63f2de..61160474b3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -118,6 +118,8 @@ if (NOT MSVC) else() # Silence "deprecation" warnings add_definitions(/D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D_SCL_SECURE_NO_WARNINGS) + # Avoid non-compliant standard library extensions + add_definitions(/D_CRT_DECLARE_NONSTDC_NAMES) # Avoid windows.h junk add_definitions(/DNOMINMAX) # Avoid windows.h from including some usually unused libs like winsocks.h, since this might cause some redefinition errors.