From e37ab851ad7a5243682ba1dfe019aef9a3749ac3 Mon Sep 17 00:00:00 2001 From: BhaaL Date: Fri, 26 May 2017 23:01:41 +0200 Subject: [PATCH] add the same flags to CMake --- Source/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 823094bf48..50c04c0f18 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -13,6 +13,12 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows") add_definitions(-D_CRT_SECURE_NO_DEPRECATE) endif() +# enable the latest C++ standard feature set, +# and also disable MSVC specific extensions +# to be even more standards compliant. +check_and_add_flag(CPPLATEST /std:c++latest) +check_and_add_flag(STANDARD_COMPLIANCE /permissive-) + # These aren't actually needed for C11/C++11 # but some dependencies require them (LLVM, libav). add_definitions(-D__STDC_LIMIT_MACROS)