diff options
author | Arkady Shapkin <arkady.shapkin@gmail.com> | 2018-03-22 18:50:03 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-04-04 17:21:16 (GMT) |
commit | 45bf6f6246a72874c880aa3de13ba957abd50ca6 (patch) | |
tree | 5528336b8b7045041ceb211173c5699871b8e1eb /Modules/FindIce.cmake | |
parent | 304f493e570a177795575b5297c4b54bf1b3d2ac (diff) | |
download | CMake-45bf6f6246a72874c880aa3de13ba957abd50ca6.zip CMake-45bf6f6246a72874c880aa3de13ba957abd50ca6.tar.gz CMake-45bf6f6246a72874c880aa3de13ba957abd50ca6.tar.bz2 |
Modules: Use MSVC_TOOLSET_VERSION variable to simplify logic
Diffstat (limited to 'Modules/FindIce.cmake')
-rw-r--r-- | Modules/FindIce.cmake | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/Modules/FindIce.cmake b/Modules/FindIce.cmake index b37f796..df76e5a 100644 --- a/Modules/FindIce.cmake +++ b/Modules/FindIce.cmake @@ -255,21 +255,15 @@ function(_Ice_FIND) unset(vcvers) if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19.10) + if(MSVC_TOOLSET_VERSION GREATER_EQUAL 141) set(vcvers "141;140") - elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19) - set(vcvers "140") - elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18) - set(vcvers "120") - elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17) - set(vcvers "110") - elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16) - set(vcvers "100") - elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15) - set(vcvers "90") + elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 100) + set(vcvers "${MSVC_TOOLSET_VERSION}") + elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 90) + set(vcvers "${MSVC_TOOLSET_VERSION}") set(vcyear "2008") - elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14) - set(vcvers "80") + elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 80) + set(vcvers "${MSVC_TOOLSET_VERSION}") set(vcyear "2005") else() # Unknown version set(vcvers Unknown) |