diff options
author | Brad King <brad.king@kitware.com> | 2017-11-07 13:21:13 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-11-07 13:21:23 (GMT) |
commit | b5d8610430b844231278db9ca3f807e2c433a608 (patch) | |
tree | 7b1aac4aa7ccd829bbdfe579048289cfbadced00 /Modules | |
parent | 1348f97784e0aaa1c4254011bfc9b6990993ee53 (diff) | |
parent | d70bdc72ce5f480947077e435433fc6cf524be4d (diff) | |
download | CMake-b5d8610430b844231278db9ca3f807e2c433a608.zip CMake-b5d8610430b844231278db9ca3f807e2c433a608.tar.gz CMake-b5d8610430b844231278db9ca3f807e2c433a608.tar.bz2 |
Merge topic 'findboost-compiler-version'
d70bdc72 FindBoost: support more than one number in version components
335816ef FindBoost: use CMake's compiler version rather than querying again
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1441
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindBoost.cmake | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index 88d14ab..6f60eeb 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() |