summaryrefslogtreecommitdiffhomepage
path: root/cmake/opentrack-platform.cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2021-12-31 23:16:24 +0100
committerStanislaw Halik <sthalik@misaki.pl>2021-12-31 23:16:24 +0100
commitc502789d911db7a3a3ce705fe7fc5e77c152572c (patch)
treec34477463f327b3624ef9443b748eb6c31f7ce72 /cmake/opentrack-platform.cmake
parent5caf3cabe633524143ba467e27e2e5da15b7d9ab (diff)
cmake: future-proof the msvc version check for -external:W0
Diffstat (limited to 'cmake/opentrack-platform.cmake')
-rw-r--r--cmake/opentrack-platform.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake
index d96fcc3a..488434f7 100644
--- a/cmake/opentrack-platform.cmake
+++ b/cmake/opentrack-platform.cmake
@@ -137,7 +137,10 @@ if(MSVC)
add_link_options(-ignore:4020)
add_link_options(-ignore:4217) # debug build
- if (MSVC_VERSION MATCHES "^(19[3-9]..|2...)$")
+ if(MSVC_VERSION GREATER_EQUAL 1913)
+ if(NOT MSVC_VERSION GREATER_EQUAL 1929)
+ add_compile_options(-experimental:external)
+ endif()
add_compile_options(-external:W0 -external:anglebrackets)
endif()
add_compile_options(-Zc:preprocessor)