diff options
Diffstat (limited to 'Modules/FindBoost.cmake')
-rw-r--r-- | Modules/FindBoost.cmake | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 88d14abd2f..0786248d72 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -391,13 +391,8 @@ endmacro() # version with a regex. # function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION) - - exec_program(${CMAKE_CXX_COMPILER} - ARGS ${CMAKE_CXX_COMPILER_ARG1} -dumpversion - OUTPUT_VARIABLE _boost_COMPILER_VERSION - ) - string(REGEX REPLACE "([0-9])\\.([0-9])(\\.[0-9])?" "\\1\\2" - _boost_COMPILER_VERSION ${_boost_COMPILER_VERSION}) + string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\1\\2" + _boost_COMPILER_VERSION ${CMAKE_CXX_COMPILER_VERSION}) set(${_OUTPUT_VERSION} ${_boost_COMPILER_VERSION} PARENT_SCOPE) endfunction() @@ -434,9 +429,7 @@ endfunction() # Guesses Boost's compiler prefix used in built library names # Returns the guess by setting the variable pointed to by _ret function(_Boost_GUESS_COMPILER_PREFIX _ret) - if(CMAKE_CXX_COMPILER_ID STREQUAL "Intel" - OR CMAKE_CXX_COMPILER MATCHES "icl" - OR CMAKE_CXX_COMPILER MATCHES "icpc") + if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel") if(WIN32) set (_boost_COMPILER "-iw") else() @@ -1400,8 +1393,8 @@ endif() # support libraries if(WIN32 AND Boost_USE_DEBUG_RUNTIME) if("x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xMSVC" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icl" - OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc") + OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xClang" + OR "x${CMAKE_CXX_COMPILER_ID}" STREQUAL "xIntel") string(APPEND _boost_DEBUG_ABI_TAG "g") endif() endif() |