From 2ed951b485128790abcacf4a4f1541a8c10d4a57 Mon Sep 17 00:00:00 2001 From: Bob Cao Date: Mon, 1 Apr 2019 16:54:41 -0700 Subject: [PATCH 1/2] Update CMakeLists.txt MSVC doesn't use GNU style flags. Optimization flags: https://docs.microsoft.com/en-us/cpp/build/reference/o-options-optimize-code?view=vs-2017 MSVC does not have c++11 flags, the oldest is c++14 https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2017 --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b1a04ba..dda8267 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -121,7 +121,7 @@ if(WIN32) if(MSVC) - set(MSVC_CXX_FLAGS "-std=gnu++11") + set(MSVC_CXX_FLAGS "/std:c++14 /O2") if(BUILD_DEBUG) set(CMAKE_BUILD_TYPE Debug) @@ -135,7 +135,7 @@ if(WIN32) if(MINGW) - set(MSVC_CXX_FLAGS "-std=gnu++11") + set(MSVC_CXX_FLAGS "/std:c++14 /O2") if(BUILD_DEBUG) set(CMAKE_BUILD_TYPE Debug) From b8f9ef6aa272d4f798e5f3e66d2f0eb010c852bf Mon Sep 17 00:00:00 2001 From: Bob Cao Date: Mon, 1 Apr 2019 16:55:35 -0700 Subject: [PATCH 2/2] Update CMakeLists.txt MSVC doesn't use GNU style flags. Optimization flags: https://docs.microsoft.com/en-us/cpp/build/reference/o-options-optimize-code?view=vs-2017 MSVC does not have c++11 flags, the oldest is c++14 https://docs.microsoft.com/en-us/cpp/build/reference/std-specify-language-standard-version?view=vs-2017 --- CGL/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CGL/CMakeLists.txt b/CGL/CMakeLists.txt index 251bb09..e32f282 100755 --- a/CGL/CMakeLists.txt +++ b/CGL/CMakeLists.txt @@ -125,7 +125,7 @@ if(WIN32) if(MSVC) - set(MSVC_CXX_FLAGS "-std=c++11") + set(MSVC_CXX_FLAGS "\std:c++14 \O2") if(CGL_BUILD_DEBUG) set(CMAKE_BUILD_TYPE Debug) @@ -140,7 +140,7 @@ if(WIN32) if(MINGW) - set(MSVC_CXX_FLAGS "-std=c++11") + set(MSVC_CXX_FLAGS "\std:c++14 \O2") if(CGL_BUILD_DEBUG) set(CMAKE_BUILD_TYPE Debug)