BUG: Avoid boost versions less than required
Construction of a list of candidate versions used to produce search paths now discards versions less than requested by the user. See issue #7783.
This commit is contained in:
parent
ad44a41a18
commit
db4f2bdffc
|
@ -94,20 +94,37 @@
|
||||||
OPTION(Boost_USE_MULTITHREADED
|
OPTION(Boost_USE_MULTITHREADED
|
||||||
"Use the multithreaded versions of the Boost libraries" ON)
|
"Use the multithreaded versions of the Boost libraries" ON)
|
||||||
|
|
||||||
if (Boost_FIND_VERSION_EXACT)
|
if(Boost_FIND_VERSION_EXACT)
|
||||||
if (Boost_FIND_VERSION_PATCH)
|
# The version may appear in a directory with or without the patch
|
||||||
set( _boost_TEST_VERSIONS
|
# level, even when the patch level is non-zero.
|
||||||
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}")
|
set(_boost_TEST_VERSIONS
|
||||||
else (Boost_FIND_VERSION_PATCH)
|
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}"
|
||||||
set( _boost_TEST_VERSIONS
|
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
|
||||||
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.0"
|
else(Boost_FIND_VERSION_EXACT)
|
||||||
"${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
|
# The user has not requested an exact version. Among known
|
||||||
endif (Boost_FIND_VERSION_PATCH)
|
# versions, find those that are acceptable to the user request.
|
||||||
else (Boost_FIND_VERSION_EXACT)
|
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
|
||||||
set( _boost_TEST_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
|
"1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
|
||||||
"1.36.1" "1.36.0" "1.36" "1.35.1" "1.35.0" "1.35" "1.34.1" "1.34.0"
|
"1.34" "1.33.1" "1.33.0" "1.33")
|
||||||
"1.34" "1.33.1" "1.33.0" "1.33" )
|
set(_boost_TEST_VERSIONS)
|
||||||
endif (Boost_FIND_VERSION_EXACT)
|
if(Boost_FIND_VERSION)
|
||||||
|
set(_Boost_FIND_VERSION_SHORT "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
|
||||||
|
# Select acceptable versions.
|
||||||
|
foreach(version ${_Boost_KNOWN_VERSIONS})
|
||||||
|
if(NOT "${version}" VERSION_LESS "${Boost_FIND_VERSION}")
|
||||||
|
# This version is high enough.
|
||||||
|
list(APPEND _boost_TEST_VERSIONS "${version}")
|
||||||
|
elseif("${version}.99" VERSION_EQUAL "${_Boost_FIND_VERSION_SHORT}.99")
|
||||||
|
# This version is a short-form for the requested version with
|
||||||
|
# the patch level dropped.
|
||||||
|
list(APPEND _boost_TEST_VERSIONS "${version}")
|
||||||
|
endif()
|
||||||
|
endforeach(version)
|
||||||
|
else(Boost_FIND_VERSION)
|
||||||
|
# Any version is acceptable.
|
||||||
|
set(_boost_TEST_VERSIONS "${_Boost_KNOWN_VERSIONS}")
|
||||||
|
endif(Boost_FIND_VERSION)
|
||||||
|
endif(Boost_FIND_VERSION_EXACT)
|
||||||
|
|
||||||
# The reason that we failed to find Boost. This will be set to a
|
# The reason that we failed to find Boost. This will be set to a
|
||||||
# user-friendly message when we fail to find some necessary piece of
|
# user-friendly message when we fail to find some necessary piece of
|
||||||
|
|
Loading…
Reference in New Issue