FindBoost: Test `CMAKE_CXX_COMPILER_{ID,VERSION}` instead of `MSVC*`
This commit is contained in:
parent
cf12e4abcd
commit
3720d5f4a3
|
@ -442,24 +442,26 @@ function(_Boost_GUESS_COMPILER_PREFIX _ret)
|
|||
endif()
|
||||
elseif (GHSMULTI)
|
||||
set(_boost_COMPILER "-ghs")
|
||||
elseif (MSVC14)
|
||||
set(_boost_COMPILER "-vc140")
|
||||
elseif (MSVC12)
|
||||
set(_boost_COMPILER "-vc120")
|
||||
elseif (MSVC11)
|
||||
set(_boost_COMPILER "-vc110")
|
||||
elseif (MSVC10)
|
||||
set(_boost_COMPILER "-vc100")
|
||||
elseif (MSVC90)
|
||||
set(_boost_COMPILER "-vc90")
|
||||
elseif (MSVC80)
|
||||
set(_boost_COMPILER "-vc80")
|
||||
elseif (MSVC71)
|
||||
set(_boost_COMPILER "-vc71")
|
||||
elseif (MSVC70) # Good luck!
|
||||
set(_boost_COMPILER "-vc7") # yes, this is correct
|
||||
elseif (MSVC60) # Good luck!
|
||||
set(_boost_COMPILER "-vc6") # yes, this is correct
|
||||
elseif("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC")
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 19)
|
||||
set(_boost_COMPILER "-vc140")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18)
|
||||
set(_boost_COMPILER "-vc120")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 17)
|
||||
set(_boost_COMPILER "-vc110")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 16)
|
||||
set(_boost_COMPILER "-vc100")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 15)
|
||||
set(_boost_COMPILER "-vc90")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 14)
|
||||
set(_boost_COMPILER "-vc80")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13.10)
|
||||
set(_boost_COMPILER "-vc71")
|
||||
elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 13) # Good luck!
|
||||
set(_boost_COMPILER "-vc7") # yes, this is correct
|
||||
else() # MSVC60 Good luck!
|
||||
set(_boost_COMPILER "-vc6") # yes, this is correct
|
||||
endif()
|
||||
elseif (BORLAND)
|
||||
set(_boost_COMPILER "-bcb")
|
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "SunPro")
|
||||
|
@ -1261,7 +1263,8 @@ endif()
|
|||
# g using debug versions of the standard and runtime
|
||||
# support libraries
|
||||
if(WIN32 AND Boost_USE_DEBUG_RUNTIME)
|
||||
if(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
|
||||
if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC"
|
||||
OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
|
||||
OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
|
||||
set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}g")
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue