From 4c580bc3b7f64be7046a3ee66d9e75b753bf1215 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Sat, 21 Jan 2017 14:37:47 -0800 Subject: [PATCH 1/2] 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) From c4640295b15d3dd7c7362ca0d8452c5c5526eec7 Mon Sep 17 00:00:00 2001 From: Michael Maltese Date: Sat, 21 Jan 2017 15:18:46 -0800 Subject: [PATCH 2/2] CMake: add CMAKE_CXX_STANDARD_REQUIRED=ON --- Source/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 08576f2b18..823094bf48 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1,4 +1,5 @@ set(CMAKE_CXX_STANDARD 14) +set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) if(CMAKE_SYSTEM_NAME MATCHES "Windows")