summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-07 13:21:13 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-11-07 13:21:23 (GMT)
commitb5d8610430b844231278db9ca3f807e2c433a608 (patch)
tree7b1aac4aa7ccd829bbdfe579048289cfbadced00 /Modules
parent1348f97784e0aaa1c4254011bfc9b6990993ee53 (diff)
parentd70bdc72ce5f480947077e435433fc6cf524be4d (diff)
downloadCMake-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.cmake9
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()