mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 22:30:13 -06:00
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:
@@ -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}")
|
||||
|
||||
|
||||
1
Tests/RunCMake/FindBoost/NoCXX-stderr.txt
Normal file
1
Tests/RunCMake/FindBoost/NoCXX-stderr.txt
Normal file
@@ -0,0 +1 @@
|
||||
.*
|
||||
1
Tests/RunCMake/FindBoost/NoCXX.cmake
Normal file
1
Tests/RunCMake/FindBoost/NoCXX.cmake
Normal file
@@ -0,0 +1 @@
|
||||
find_package(Boost)
|
||||
@@ -1,3 +1,4 @@
|
||||
include(RunCMake)
|
||||
|
||||
run_cmake(CMakePackage)
|
||||
run_cmake(NoCXX)
|
||||
|
||||
Reference in New Issue
Block a user