From 4c580bc3b7f64be7046a3ee66d9e75b753bf1215 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Sat, 21 Jan 2017 14:37:47 -0800 Subject: [PATCH] CMake: Use CMAKE_CXX_STANDARD instead of passing -std=c++14 Available since CMake 3.1 --- Source/CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 6ae6af470f..08576f2b18 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1,7 +1,5 @@ -check_and_add_flag(CXX14 -std=c++14) -if(NOT FLAG_CXX_CXX14) - check_and_add_flag(HAS_CXX1Y -std=c++1y) -endif() +set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_EXTENSIONS OFF) if(CMAKE_SYSTEM_NAME MATCHES "Windows") add_definitions(-DNOMINMAX)