File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -242,23 +242,23 @@ function(Vcvars_ConvertMsvcVersionToVsVersion msvc_version output_var)
242242 message (FATAL_ERROR "msvc_version is expected to match `${_Vcvars_MSVC_VERSION_REGEX} `" )
243243 endif ()
244244 # See https://en.wikipedia.org/wiki/Microsoft_Visual_C%2B%2B#Internal_version_numbering
245- if (( msvc_version GREATER_EQUAL 1930) AND ( msvc_version LESS 1950)) # VS 2022
245+ if (msvc_version IN_LIST Vcvars_VS17_MSVC_VERSIONS) # VS 2022
246246 set (vs_version "17" )
247- elseif (( msvc_version GREATER_EQUAL 1920) AND ( msvc_version LESS 1930) ) # VS 2019
247+ elseif (msvc_version IN_LIST Vcvars_VS16_MSVC_VERSIONS ) # VS 2019
248248 set (vs_version "16" )
249- elseif (( msvc_version GREATER_EQUAL 1910) AND ( msvc_version LESS 1920) ) # VS 2017
249+ elseif (msvc_version IN_LIST Vcvars_VS15_MSVC_VERSIONS ) # VS 2017
250250 set (vs_version "15" )
251- elseif (msvc_version EQUAL 1900 ) # VS 2015
251+ elseif (msvc_version IN_LIST Vcvars_VS14_MSVC_VERSIONS ) # VS 2015
252252 set (vs_version "14.0" )
253- elseif (msvc_version EQUAL 1800 ) # VS 2013
253+ elseif (msvc_version IN_LIST Vcvars_VS12_MSVC_VERSIONS ) # VS 2013
254254 set (vs_version "12.0" )
255- elseif (msvc_version EQUAL 1700 ) # VS 2012
255+ elseif (msvc_version IN_LIST Vcvars_VS11_MSVC_VERSIONS ) # VS 2012
256256 set (vs_version "11.0" )
257- elseif (msvc_version EQUAL 1600 ) # VS 2010
257+ elseif (msvc_version IN_LIST Vcvars_VS10_MSVC_VERSIONS ) # VS 2010
258258 set (vs_version "10.0" )
259- elseif (msvc_version EQUAL 1500 ) # VS 2008
259+ elseif (msvc_version IN_LIST Vcvars_VS9_MSVC_VERSIONS ) # VS 2008
260260 set (vs_version "9.0" )
261- elseif (msvc_version EQUAL 1400 ) # VS 2005
261+ elseif (msvc_version IN_LIST Vcvars_VS8_MSVC_VERSIONS ) # VS 2005
262262 set (vs_version "8.0" )
263263 elseif (msvc_version EQUAL 1310) # VS 2003
264264 set (vs_version "7.1" )
You can’t perform that action at this time.
0 commit comments