[Cmake-commits] [cmake-commits] king committed FindBoost.cmake 1.14 1.15

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Oct 9 17:04:14 EDT 2008


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv2421/Modules

Modified Files:
	FindBoost.cmake 
Log Message:
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.


Index: FindBoost.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindBoost.cmake,v
retrieving revision 1.14
retrieving revision 1.15
diff -C 2 -d -r1.14 -r1.15
*** FindBoost.cmake	16 Sep 2008 14:30:32 -0000	1.14
--- FindBoost.cmake	9 Oct 2008 21:04:11 -0000	1.15
***************
*** 95,112 ****
    "Use the multithreaded versions of the Boost libraries" ON)
  
! if (Boost_FIND_VERSION_EXACT)
!   if (Boost_FIND_VERSION_PATCH)
!     set( _boost_TEST_VERSIONS 
!       "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}")
!   else (Boost_FIND_VERSION_PATCH)
!     set( _boost_TEST_VERSIONS 
!       "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.0"
!       "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
!   endif (Boost_FIND_VERSION_PATCH)
! else (Boost_FIND_VERSION_EXACT)
!   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.34" "1.33.1" "1.33.0" "1.33" )
! endif (Boost_FIND_VERSION_EXACT)
  
  # The reason that we failed to find Boost. This will be set to a
--- 95,129 ----
    "Use the multithreaded versions of the Boost libraries" ON)
  
! if(Boost_FIND_VERSION_EXACT)
!   # The version may appear in a directory with or without the patch
!   # level, even when the patch level is non-zero.
!   set(_boost_TEST_VERSIONS
!     "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}.${Boost_FIND_VERSION_PATCH}"
!     "${Boost_FIND_VERSION_MAJOR}.${Boost_FIND_VERSION_MINOR}")
! else(Boost_FIND_VERSION_EXACT)
!   # The user has not requested an exact version.  Among known
!   # versions, find those that are acceptable to the user request.
!   set(_Boost_KNOWN_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.34" "1.33.1" "1.33.0" "1.33")
!   set(_boost_TEST_VERSIONS)
!   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



More information about the Cmake-commits mailing list