diff options
author | Brad King <brad.king@kitware.com> | 2019-04-15 14:49:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-04-15 14:49:54 (GMT) |
commit | 6aab5e0ef9b95933495042f3e2dab64c3c002f37 (patch) | |
tree | 53ca498d981b4ca85b1e5b65f7aa843344d6eb85 | |
parent | ef9c38ccf8b6bf12e8d8b539a316a304076948c8 (diff) | |
parent | 032e969879f4362471eb4a952b28aae6fd5a8116 (diff) | |
download | CMake-6aab5e0ef9b95933495042f3e2dab64c3c002f37.zip CMake-6aab5e0ef9b95933495042f3e2dab64c3c002f37.tar.gz CMake-6aab5e0ef9b95933495042f3e2dab64c3c002f37.tar.bz2 |
Merge topic 'FindBoost-msvc-toolset-14.2'
032e969879 Merge branch 'backport-FindBoost-msvc-toolset-14.2'
717e85418b FindBoost: Add support for MSVC toolset version 14.2
9010f5c18a FindBoost: Add support for MSVC toolset version 14.2
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3221
-rw-r--r-- | Modules/FindBoost.cmake | 25 |
1 files changed, 20 insertions, 5 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 53be493..c30c6c8 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -466,8 +466,17 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret) elseif (GHSMULTI) set(_boost_COMPILER "-ghs") elseif("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC" OR "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") - if(MSVC_TOOLSET_VERSION GREATER_EQUAL 141) - set(_boost_COMPILER "-vc141;-vc140") + if(MSVC_TOOLSET_VERSION GREATER_EQUAL 150) + # Not yet known. + set(_boost_COMPILER "") + elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 140) + # MSVC toolset 14.x versions are forward compatible. + set(_boost_COMPILER "") + foreach(v 9 8 7 6 5 4 3 2 1 0) + if(MSVC_TOOLSET_VERSION GREATER_EQUAL 14${v}) + list(APPEND _boost_COMPILER "-vc14${v}") + endif() + endforeach() elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 80) set(_boost_COMPILER "-vc${MSVC_TOOLSET_VERSION}") elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.10) @@ -1083,9 +1092,15 @@ function(_Boost_UPDATE_WINDOWS_LIBRARY_SEARCH_DIRS_WITH_PREBUILT_PATHS component else() set(_arch_suffix 32) endif() - if(MSVC_TOOLSET_VERSION GREATER_EQUAL 141) - list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.1) - list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.0) + if(MSVC_TOOLSET_VERSION GREATER_EQUAL 150) + # Not yet known. + elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 140) + # MSVC toolset 14.x versions are forward compatible. + foreach(v 9 8 7 6 5 4 3 2 1 0) + if(MSVC_TOOLSET_VERSION GREATER_EQUAL 14${v}) + list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-14.${v}) + endif() + endforeach() elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 80) math(EXPR _toolset_major_version "${MSVC_TOOLSET_VERSION} / 10") list(APPEND ${componentlibvar} ${basedir}/lib${_arch_suffix}-msvc-${_toolset_major_version}.0) |