summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-platform.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-07-24 03:24:52 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-07-24 03:24:52 +0200
commit381ad545a0769f8ab1d373c3c3da74c73d170b61 (patch)
tree9fe9b7f70b20bf8d85254aaff729972224892a91 /cmake/opentrack-platform.cmake
parentda4a8fd79f951aba9a4ec67fce0fd046e0ca37ca (diff)
cmake: pass /permissive- to MSVC++ 15.3+
Diffstat (limited to 'cmake/opentrack-platform.cmake')
-rw-r--r--cmake/opentrack-platform.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index 838df02a..7e140e98 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -60,6 +60,10 @@ if(MSVC)
add_definitions(-DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
add_definitions(-D_ITERATOR_DEBUG_LEVEL=0 -D_ITERATOR_DEBUG_LEVEL=0)
add_definitions(-D_HAS_EXCEPTIONS=0)
+ if(MSVC_VERSION GREATER 1910) # 1911 is 15.3 update
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -permissive-")
+ set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -permissive-")
+ endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Zi -std:c++14")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Zi")