From c502789d911db7a3a3ce705fe7fc5e77c152572c Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 31 Dec 2021 23:16:24 +0100 Subject: cmake: future-proof the msvc version check for -external:W0 --- cmake/opentrack-platform.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3