mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 10:50:16 -06:00
FindBoost: Consider boost suffixes suitable for clang-cl
When compiling with `clang-cl` we can use either the MSVC- or Clang-built boost libraries.
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user