summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2018-04-06 06:04:51 +0200
committerStanislaw Halik <sthalik@misaki.pl>2018-04-06 06:04:51 +0200
commit2196b0adfb180942ab6102f58adefd9b0c953321 (patch)
tree7a2f8f7b84a6b370d361a96e4945cca7287d7a01
parentfce9ee31ec0ded06230fb7bce5b8b959e9968826 (diff)
cmake: now can specify c++ standard for MSVC
-rw-r--r--cmake/opentrack-platform.cmake6
1 files changed, 2 insertions, 4 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index 810544f4..c5d1da93 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -71,8 +71,6 @@ if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${__stuff}")
set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} ${__stuff}")
endif()
-
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std:c++latest")
else()
set(__stuff "-fms-compatibility -fms-compatibility-version=1911 -fms-extensions")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${__stuff} -std:c++latest -Xclang -std=c++17")
@@ -124,12 +122,12 @@ if(APPLE)
set(CMAKE_CXX_FLAGS " -stdlib=libc++ ${CMAKE_CXX_FLAGS}")
endif()
-if(NOT MSVC)
+#if(NOT MSVC)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_DEFAULT 17)
set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS FALSE)
-endif()
+#endif()
foreach(k _RELEASE _DEBUG _RELWITHDEBINFO _MINSIZEREL)
set(CMAKE_C_FLAGS${k} "${CMAKE_C_FLAGS${k}} -UNDEBUG")