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

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Sep 16 10:30:34 EDT 2008


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

Modified Files:
	FindBoost.cmake 
Log Message:
BUG: Fix FindBoost versioned find

To locate the boost include directory, all search paths and versioned
path suffixes should be passed to one call of FIND_PATH.  Previously the
test for one version would find an unversioned system boost even when
the user set BOOST_ROOT (since the NO_DEFAULT_PATH option is not used).
See issue #7456.


Index: FindBoost.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindBoost.cmake,v
retrieving revision 1.13
retrieving revision 1.14
diff -C 2 -d -r1.13 -r1.14
*** FindBoost.cmake	28 Jul 2008 19:40:04 -0000	1.13
--- FindBoost.cmake	16 Sep 2008 14:30:32 -0000	1.14
***************
*** 287,292 ****
    # Try to find Boost by stepping backwards through the Boost versions
    # we know about.
!   FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
!     IF( NOT Boost_INCLUDE_DIR )
        # Add in a path suffix, based on the required version, ideally
        # we could read this from version.hpp, but for that to work we'd
--- 287,294 ----
    # Try to find Boost by stepping backwards through the Boost versions
    # we know about.
!   IF( NOT Boost_INCLUDE_DIR )
!     # Build a list of path suffixes for each version.
!     SET(_boost_PATH_SUFFIXES)
!     FOREACH(_boost_VER ${_boost_TEST_VERSIONS})
        # Add in a path suffix, based on the required version, ideally
        # we could read this from version.hpp, but for that to work we'd
***************
*** 305,317 ****
              _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX})
        ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
  
!       FIND_PATH(Boost_INCLUDE_DIR
!           NAMES         boost/config.hpp
!           HINTS         ${_boost_INCLUDE_SEARCH_DIRS}
!           PATH_SUFFIXES ${_boost_PATH_SUFFIX}
        )
! 
!     ENDIF( NOT Boost_INCLUDE_DIR )
!   ENDFOREACH(_boost_VER)
  
    IF(Boost_INCLUDE_DIR)
--- 307,320 ----
              _boost_PATH_SUFFIX ${_boost_PATH_SUFFIX})
        ENDIF(_boost_PATH_SUFFIX MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+")
+       LIST(APPEND _boost_PATH_SUFFIXES "${_boost_PATH_SUFFIX}")
+     ENDFOREACH(_boost_VER)
  
!     # Look for a standard boost header file.
!     FIND_PATH(Boost_INCLUDE_DIR
!       NAMES         boost/config.hpp
!       HINTS         ${_boost_INCLUDE_SEARCH_DIRS}
!       PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
        )
!   ENDIF( NOT Boost_INCLUDE_DIR )
  
    IF(Boost_INCLUDE_DIR)



More information about the Cmake-commits mailing list