This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 59195aaf5870e87390e590774751f0af457d9173 (commit) via 7da796d1fdd7cca07df733d010cd343f6f8787a9 (commit) from d473d1eb3f111bd83f98d31e1cfc62ca8a19639c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=59195aaf5870e87390e590774751f0af457d9173 commit 59195aaf5870e87390e590774751f0af457d9173 Merge: d473d1e 7da796d Author: Brad King <brad.k...@kitware.com> AuthorDate: Thu Sep 1 15:01:50 2011 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Thu Sep 1 15:01:50 2011 -0400 Merge topic 'boost-cmake-path-suffixes' into next 7da796d FindBoost: Call find_package with NO_MODULE first http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7da796d1fdd7cca07df733d010cd343f6f8787a9 commit 7da796d1fdd7cca07df733d010cd343f6f8787a9 Author: Todd Gamblin <tgamb...@llnl.gov> AuthorDate: Sat Aug 27 10:48:55 2011 -0700 Commit: Brad King <brad.k...@kitware.com> CommitDate: Thu Sep 1 15:00:21 2011 -0400 FindBoost: Call find_package with NO_MODULE first FindBoost now attempts to find Boost using find_package(Boost NO_MODULE) before it does a module mode search. User can now set any of these to Boost's install prefix to detect it in module or config mode: - Boost_DIR for consistency with other CMake modules - BOOST_ROOT or BOOSTROOT for adherence to boost convention diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake index c3ac424..5ccbd6b 100644 --- a/Modules/FindBoost.cmake +++ b/Modules/FindBoost.cmake @@ -34,7 +34,7 @@ # Boost that contain header files only (e.g. foreach) you do not need to # specify COMPONENTS. # -# You should provide a minimum version number that should be used. If you provide this +# You should provide a minimum version number that should be used. If you provide this # version number and specify the REQUIRED attribute, this module will fail if it # can't find the specified or a later version. If you specify a version number this is # automatically put into the considered list of version numbers and thus doesn't need @@ -92,6 +92,12 @@ # BOOST_ROOT. Defaults to OFF. # [Since CMake 2.8.3] # +# Boost_NO_BOOST_CMAKE Do not do a find_package call in config mode +# before searching for a regular boost install. +# This will avoid finding boost-cmake installs. +# Defaults to OFF. +# [Since CMake 2.8.6] +# # Boost_USE_STATIC_RUNTIME If enabled, searches for boost libraries # linked against a static C++ standard library # ('s' ABI tag). This option should be set to @@ -134,7 +140,7 @@ # unless this is set to TRUE or the REQUIRED # keyword is specified in find_package(). # [Since CMake 2.8.0] -# +# # Boost_COMPILER Set this to the compiler suffix used by Boost # (e.g. "-gcc43") if FindBoost has problems finding # the proper Boost installation @@ -164,13 +170,27 @@ # # These last three variables are available also as environment variables: -# Also, note they are completely UPPERCASE. +# Also, note they are completely UPPERCASE, except Boost_DIR. +# +# Boost_DIR or The preferred installation prefix for searching for +# BOOST_ROOT or BOOSTROOT Boost. Set this if the module has problems finding +# the proper Boost installation. +# +# Note that Boost_DIR behaves exactly as <package>_DIR +# variables are documented to behave in find_package's +# Config mode. That is, if it is set as a -D argument +# to CMake, it must point to the location of the +# BoostConfig.cmake or Boost-config.cmake file. If it +# is set as an environment variable, it must point to +# the root of the boost installation. BOOST_ROOT and +# BOOSTROOT, on the other hand, will point to the root +# in either case. +# +# To prevent falling back on the system paths, set +# Boost_NO_SYSTEM_PATHS to true. # -# BOOST_ROOT or BOOSTROOT The preferred installation prefix for searching for -# Boost. Set this if the module has problems finding -# the proper Boost installation. To prevent falling -# back on the system paths, set Boost_NO_SYSTEM_PATHS -# to true. +# To avoid finding boost-cmake installations, set +# Boost_NO_BOOST_CMAKE to true. # # BOOST_INCLUDEDIR Set this to the include directory of Boost, if the # module has problems finding the proper Boost installation @@ -237,6 +257,43 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) + +#------------------------------------------------------------------------------- +# Before we go searching, check whether boost-cmake is avaialble, unless the +# user specifically asked NOT to search for boost-cmake. +# +# If Boost_DIR is set, this behaves as any find_package call would. If not, +# it looks at BOOST_ROOT and BOOSTROOT to find Boost. +# +if (NOT Boost_NO_BOOST_CMAKE) + # If Boost_DIR is not set, look for BOOSTROOT and BOOST_ROOT as alternatives, + # since these are more conventional for Boost. + if ("$ENV{Boost_DIR}" STREQUAL "") + if (NOT "$ENV{BOOST_ROOT}" STREQUAL "") + set(ENV{Boost_DIR} $ENV{BOOST_ROOT}) + elseif (NOT "$ENV{BOOSTROOT}" STREQUAL "") + set(ENV{Boost_DIR} $ENV{BOOSTROOT}) + endif() + endif() + + # Do the same find_package call but look specifically for the CMake version. + # Note that args are passed in the Boost_FIND_xxxxx variables, so there is no + # need to delegate them to this find_package call. + find_package(Boost QUIET NO_MODULE) + + # If we found boost-cmake, then we're done. Print out what we found. + # Otherwise let the rest of the module try to find it. + if (Boost_FOUND) + message("Boost ${Boost_FIND_VERSION} found.") + if (Boost_FIND_COMPONENTS) + message("Found Boost components:") + message(" ${Boost_FIND_COMPONENTS}") + endif() + return() + endif() +endif() + + #------------------------------------------------------------------------------- # FindBoost functions & macros # @@ -287,7 +344,7 @@ macro(_Boost_ADJUST_LIB_VARS basename) set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} ) set(Boost_${basename}_LIBRARIES ${Boost_${basename}_LIBRARY_RELEASE} ) endif() - + if(Boost_${basename}_LIBRARY) set(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY} CACHE FILEPATH "The Boost ${basename} library") @@ -372,7 +429,7 @@ endfunction() # # End functions/macros -# +# #------------------------------------------------------------------------------- @@ -517,6 +574,11 @@ else(_boost_IN_CACHE) _Boost_CHECK_SPELLING(Boost_INCLUDEDIR) # If BOOST_ROOT was defined in the environment, use it. + if (NOT BOOST_ROOT AND NOT $ENV{Boost_DIR} STREQUAL "") + set(BOOST_ROOT $ENV{Boost_DIR}) + endif() + + # If BOOST_ROOT was defined in the environment, use it. if (NOT BOOST_ROOT AND NOT $ENV{BOOST_ROOT} STREQUAL "") set(BOOST_ROOT $ENV{BOOST_ROOT}) endif() ----------------------------------------------------------------------- Summary of changes: hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits