[patch] Add Boost 1.45 to search, simplify a check removing VERSION_LESS

Also some whitespace issues are cleaned up.
Patch from Adam Richardson attached to #11445
This commit is contained in:
Philip Lowman 2010-12-13 00:56:42 -05:00
parent b5d7f2c57c
commit 88babefbcc
1 changed files with 26 additions and 28 deletions

View File

@ -64,7 +64,8 @@
# Currently this module searches for the following version numbers: # Currently this module searches for the following version numbers:
# 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1, # 1.33, 1.33.0, 1.33.1, 1.34, 1.34.0, 1.34.1, 1.35, 1.35.0, 1.35.1,
# 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0, # 1.36, 1.36.0, 1.36.1, 1.37, 1.37.0, 1.38, 1.38.0, 1.39, 1.39.0,
# 1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0, 1.44, 1.44.0 # 1.40, 1.40.0, 1.41, 1.41.0, 1.42, 1.42.0, 1.43, 1.43.0, 1.44, 1.44.0,
# 1.45, 1.45.0
# #
# NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should # NOTE: If you add a new major 1.x version in Boost_ADDITIONAL_VERSIONS you should
# add both 1.x and 1.x.0 as shown above. Official Boost include directories # add both 1.x and 1.x.0 as shown above. Official Boost include directories
@ -377,7 +378,7 @@ else(Boost_FIND_VERSION_EXACT)
# The user has not requested an exact version. Among known # The user has not requested an exact version. Among known
# versions, find those that are acceptable to the user request. # versions, find those that are acceptable to the user request.
set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS} set(_Boost_KNOWN_VERSIONS ${Boost_ADDITIONAL_VERSIONS}
"1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42" "1.45.0" "1.45" "1.44.0" "1.44" "1.43.0" "1.43" "1.42.0" "1.42"
"1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37" "1.41.0" "1.41" "1.40.0" "1.40" "1.39.0" "1.39" "1.38.0" "1.38" "1.37.0" "1.37"
"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")
@ -412,9 +413,7 @@ IF(Boost_INCLUDE_DIR)
# On versions < 1.35, remove the System library from the considered list # On versions < 1.35, remove the System library from the considered list
# since it wasn't added until 1.35. # since it wasn't added until 1.35.
if(Boost_VERSION AND Boost_FIND_COMPONENTS) if(Boost_VERSION AND Boost_FIND_COMPONENTS)
math(EXPR _boost_maj "${Boost_VERSION} / 100000") if(Boost_VERSION LESS 103500)
math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000")
if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35)
list(REMOVE_ITEM Boost_FIND_COMPONENTS system) list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
endif() endif()
endif() endif()
@ -1143,4 +1142,3 @@ ELSE (_boost_IN_CACHE)
Boost_LIBRARY_DIRS Boost_LIBRARY_DIRS
) )
ENDIF(_boost_IN_CACHE) ENDIF(_boost_IN_CACHE)