Merge topic 'FindBoost-no-cxx'

0369362132 FindBoost: Restore finding without CXX language enabled

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !2663
This commit is contained in:
Brad King
2018-11-27 13:44:03 +00:00
committed by Kitware Robot
4 changed files with 6 additions and 6 deletions

View File

@@ -411,15 +411,12 @@ endmacro()
#-------------------------------------------------------------------------------
#
# Runs compiler with "-dumpversion" and parses major/minor
# version with a regex.
#
# Convert CMAKE_CXX_COMPILER_VERSION to boost compiler suffix version.
function(_Boost_COMPILER_DUMPVERSION _OUTPUT_VERSION _OUTPUT_VERSION_MAJOR _OUTPUT_VERSION_MINOR)
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\1"
_boost_COMPILER_VERSION_MAJOR ${CMAKE_CXX_COMPILER_VERSION})
_boost_COMPILER_VERSION_MAJOR "${CMAKE_CXX_COMPILER_VERSION}")
string(REGEX REPLACE "([0-9]+)\\.([0-9]+)(\\.[0-9]+)?" "\\2"
_boost_COMPILER_VERSION_MINOR ${CMAKE_CXX_COMPILER_VERSION})
_boost_COMPILER_VERSION_MINOR "${CMAKE_CXX_COMPILER_VERSION}")
set(_boost_COMPILER_VERSION "${_boost_COMPILER_VERSION_MAJOR}${_boost_COMPILER_VERSION_MINOR}")

View File

@@ -0,0 +1 @@
.*

View File

@@ -0,0 +1 @@
find_package(Boost)

View File

@@ -1,3 +1,4 @@
include(RunCMake)
run_cmake(CMakePackage)
run_cmake(NoCXX)