diff options
author | Brad King <brad.king@kitware.com> | 2019-04-04 15:32:46 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-04-04 15:33:37 (GMT) |
commit | a15ed54dca5ebd2535a737b7200677c945c5c082 (patch) | |
tree | 2d42adb99ac2de44e6cd00266aa59e6a18260e4d /Modules | |
parent | 0dfb056cd3fa655ddf3cabb6b3ce0309b3037ca1 (diff) | |
parent | d48bf97fd3ec9c6cc818d32978122f019e35f638 (diff) | |
download | CMake-a15ed54dca5ebd2535a737b7200677c945c5c082.zip CMake-a15ed54dca5ebd2535a737b7200677c945c5c082.tar.gz CMake-a15ed54dca5ebd2535a737b7200677c945c5c082.tar.bz2 |
Merge topic 'FindBoost-clang-cl'
d48bf97fd3 FindBoost: Consider boost suffixes suitable for clang-cl
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3164
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindBoost.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 6e7d3db..1231ff1 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -465,7 +465,7 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret) endif() elseif (GHSMULTI) set(_boost_COMPILER "-ghs") - elseif("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC") + 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") elseif(MSVC_TOOLSET_VERSION GREATER_EQUAL 80) @@ -477,6 +477,12 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret) else() # VS 6.0 Good luck! set(_boost_COMPILER "-vc6") # yes, this is correct endif() + + if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang") + string(REPLACE "." ";" VERSION_LIST "${CMAKE_CXX_COMPILER_VERSION}") + list(GET VERSION_LIST 0 CLANG_VERSION_MAJOR) + set(_boost_COMPILER "-clangw${CLANG_VERSION_MAJOR};${_boost_COMPILER}") + endif() elseif (BORLAND) set(_boost_COMPILER "-bcb") elseif(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro") |