[Cmake-commits] CMake branch, next, updated. v2.8.2-851-gacee917

Philip Lowman philip at yhbt.com
Mon Sep 20 22:31:18 EDT 2010


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  acee917d8fa06f8d0e64b13c1ca72cc65486777d (commit)
       via  24cb498105703f6e311a5d1064057674dd0decaf (commit)
      from  c2c5534f1888606b9ef6ac0bbe9c78a66f9a4af2 (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=acee917d8fa06f8d0e64b13c1ca72cc65486777d
commit acee917d8fa06f8d0e64b13c1ca72cc65486777d
Merge: c2c5534 24cb498
Author:     Philip Lowman <philip at yhbt.com>
AuthorDate: Mon Sep 20 22:31:12 2010 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Sep 20 22:31:12 2010 -0400

    Merge topic 'FindBoost_lots_of_fixes' into next
    
    24cb498 Revert "Lots of FindBoost bugfixes"


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24cb498105703f6e311a5d1064057674dd0decaf
commit 24cb498105703f6e311a5d1064057674dd0decaf
Author:     Philip Lowman <philip at yhbt.com>
AuthorDate: Mon Sep 20 22:26:22 2010 -0400
Commit:     Philip Lowman <philip at yhbt.com>
CommitDate: Mon Sep 20 22:29:12 2010 -0400

    Revert "Lots of FindBoost bugfixes"
    
    This reverts commit bc0b19aae0dfc4ec4d43593ad713dcce8c067e83.
    and fixes whitespace

diff --git a/Modules/FindBoost.cmake b/Modules/FindBoost.cmake
index 69deb9c..d76c9a8 100644
--- a/Modules/FindBoost.cmake
+++ b/Modules/FindBoost.cmake
@@ -17,10 +17,8 @@
 #
 # == Using actual libraries from within Boost: ==
 #
-#   set(Boost_USE_STATIC_LIBS        ON)
-#   set(Boost_USE_MULTITHREADED      ON)
-#   set(Boost_USE_STATIC_RUNTIME    OFF)
-#   set(Boost_COMPAT_STATIC_RUNTIME OFF)
+#   set(Boost_USE_STATIC_LIBS   ON)
+#   set(Boost_USE_MULTITHREADED ON)
 #   find_package( Boost 1.36.0 COMPONENTS date_time filesystem system ... )
 #
 #   if(Boost_FOUND)
@@ -86,42 +84,6 @@
 #   Boost_USE_STATIC_LIBS        Can be set to ON to force the use of the static
 #                                boost libraries. Defaults to OFF.
 #
-#   Boost_NO_SYSTEM_PATHS        Set to TRUE to suppress searching in system
-#                                paths (or other locations outside of BOOST_ROOT
-#                                or BOOST_INCLUDEDIR).  Useful when specifying
-#                                BOOST_ROOT. Defaults to OFF.
-#                                  [Since CMake 2.8.3]
-#
-#   Boost_USE_STATIC_RUNTIME     If enabled, searches for boost libraries
-#                                linked against a static C++ standard library
-#                                ('s' ABI tag). Defaults to OFF.
-#                                  [Since CMake 2.8.3]
-#
-#   Boost_USE_DEBUG_PYTHON       If enabled, searches for boost libraries
-#                                compiled against a special debug build of
-#                                Python ('y' ABI tag). Defaults to OFF.
-#                                  [Since CMake 2.8.3]
-#
-#   Boost_USE_STLPORT            If enabled, searches for boost libraries
-#                                compiled against the STLPort standard
-#                                library ('p' ABI tag). Defaults to OFF.
-#                                  [Since CMake 2.8.3]
-#
-#   Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS
-#                                If enabled, searches for boost libraries
-#                                compiled against the deprecated STLPort
-#                                "native iostreams" feature ('n' ABI tag).
-#                                Defaults to OFF.
-#                                  [Since CMake 2.8.3]
-#
-#   Boost_COMPAT_STATIC_RUNTIME  Set to OFF to disable backwards compatible
-#                                searching for libraries with the 's' ABI
-#                                tag on WIN32 after normal searches.  You
-#                                should set this to OFF and also set
-#                                Boost_USE_STATIC_RUNTIME appropriately.
-#                                If not specified, defaults to ON.
-#                                  [Since CMake 2.8.3]
-#
 # Other Variables used by this module which you may want to set.
 #
 #   Boost_ADDITIONAL_VERSIONS    A list of version numbers to use for searching
@@ -144,28 +106,11 @@
 #                                (e.g. "-gcc43") if FindBoost has problems finding
 #                                the proper Boost installation
 #
-#   Boost_THREADAPI                When building boost.thread, sometimes the name of the
-#                                library contains an additional "pthread" or "win32"
-#                                string known as the threadapi.  This can happen when
-#                                compiling against pthreads on Windows or win32 threads
-#                                on Cygwin.  You may specify this variable and if set
-#                                when FindBoost searches for the Boost threading library
-#                                it will first try to match the threadapi you specify.
-#                                  For Example: libboost_thread_win32-mgw45-mt-1_43.a
-#                                might be found if you specified "win32" here before
-#                                falling back on libboost_thread-mgw45-mt-1_43.a.
-#                                  [Since CMake 2.8.3]
-
-
-
-#
 # These last three variables are available also as environment variables:
 #
 #   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.
+#                                the proper Boost installation.
 #
 #   BOOST_INCLUDEDIR             Set this to the include directory of Boost, if the
 #                                module has problems finding the proper Boost installation
@@ -220,7 +165,7 @@
 # Copyright 2007      Wengo
 # Copyright 2007      Mike Jackson
 # Copyright 2008      Andreas Pakulat <apaku at gmx.de>
-# Copyright 2008-2010 Philip Lowman <philip at yhbt.com>
+# Copyright 2008-2009 Philip Lowman <philip at yhbt.com>
 #
 # Distributed under the OSI-approved BSD License (the "License");
 # see accompanying file Copyright.txt for details.
@@ -331,17 +276,6 @@ function(_Boost_MARK_COMPONENTS_FOUND _yes_or_no)
 endfunction()
 
 #
-# Take a list of libraries with "thread" in it
-# and prepend duplicates with "thread_${Boost_THREADAPI}"
-# at the front of the list
-#
-function(_Boost_PREPEND_LIST_WITH_THREADAPI _output)
-  set(_orig_libnames ${ARGN})
-  string(REPLACE "thread" "thread_${Boost_THREADAPI}" _threadapi_libnames ${_orig_libnames})
-  set(${_output} ${_threadapi_libnames} ${_orig_libnames} PARENT_SCOPE)
-endfunction()
-
-#
 # End functions/macros
 #  
 #-------------------------------------------------------------------------------
@@ -352,9 +286,6 @@ endfunction()
 IF(NOT DEFINED Boost_USE_MULTITHREADED)
     SET(Boost_USE_MULTITHREADED TRUE)
 ENDIF()
-if(NOT DEFINED Boost_COMPAT_STATIC_RUNTIME)
-  set(Boost_COMPAT_STATIC_RUNTIME TRUE)
-endif()
 
 if(Boost_FIND_VERSION_EXACT)
   # The version may appear in a directory with or without the patch
@@ -435,7 +366,7 @@ IF (_boost_IN_CACHE)
   if(Boost_DEBUG)
       message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
                      "boost ${Boost_MAJOR_VERSION}.${Boost_MINOR_VERSION}.${Boost_SUBMINOR_VERSION} "
-                     "is already in the cache.  To view debugging messages, please clear the cache.")
+                     "is already in the cache.  For debugging messages, please clear the cache.")
   endif()
 ELSE (_boost_IN_CACHE)
   # Need to search for boost
@@ -449,12 +380,6 @@ ELSE (_boost_IN_CACHE)
                    "Boost_USE_MULTITHREADED = ${Boost_USE_MULTITHREADED}")
     message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
                    "Boost_USE_STATIC_LIBS = ${Boost_USE_STATIC_LIBS}")
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "Boost_USE_STATIC_RUNTIME = ${Boost_USE_STATIC_RUNTIME}")
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "Boost_ADDITIONAL_VERSIONS = ${Boost_ADDITIONAL_VERSIONS}")
-    message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                   "Boost_NO_SYSTEM_PATHS = ${Boost_NO_SYSTEM_PATHS}")
   endif()
 
   IF(WIN32)
@@ -487,13 +412,6 @@ ELSE (_boost_IN_CACHE)
     /sw/local/include
   )
 
-  # If Boost_ROOT was defined, gently correct the user
-  if(Boost_ROOT)
-    message("WARNING: Boost_ROOT was set which is incorrect and is being ignored.  "
-            "You need to use BOOST_ROOT instead.  "
-            "Also, we suggest setting Boost_NO_SYSTEM_PATHS.")
-  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})
@@ -531,17 +449,12 @@ ELSE (_boost_IN_CACHE)
                    "_boost_TEST_VERSIONS = ${_boost_TEST_VERSIONS}")
   endif()
 
-  if( BOOST_ROOT )
-    if( Boost_NO_SYSTEM_PATHS )
-      set(_boost_INCLUDE_SEARCH_DIRS ${BOOST_ROOT}/include ${BOOST_ROOT})
-      set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH)
-    else()
-      set(_boost_INCLUDE_SEARCH_DIRS
-        ${BOOST_ROOT}/include
-        ${BOOST_ROOT}
-        ${_boost_INCLUDE_SEARCH_DIRS})
-    endif()
-  endif( BOOST_ROOT )
+  IF( BOOST_ROOT )
+    SET(_boost_INCLUDE_SEARCH_DIRS
+      ${BOOST_ROOT}/include
+      ${BOOST_ROOT}
+      ${_boost_INCLUDE_SEARCH_DIRS})
+  ENDIF( BOOST_ROOT )
 
   IF( BOOST_INCLUDEDIR )
     file(TO_CMAKE_PATH ${BOOST_INCLUDEDIR} BOOST_INCLUDEDIR)
@@ -573,7 +486,10 @@ ELSE (_boost_IN_CACHE)
       ENDIF()
       
       list(APPEND _boost_PATH_SUFFIXES "boost-${_boost_BOOSTIFIED_VERSION}")
-      list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
+      if(WIN32)
+        # For BoostPro's underscores (and others?)
+        list(APPEND _boost_PATH_SUFFIXES "boost_${_boost_BOOSTIFIED_VERSION}")
+      endif()
 
     ENDFOREACH(_boost_VER)
       
@@ -591,7 +507,6 @@ ELSE (_boost_IN_CACHE)
       NAMES         boost/config.hpp
       HINTS         ${_boost_INCLUDE_SEARCH_DIRS}
       PATH_SUFFIXES ${_boost_PATH_SUFFIXES}
-      ${_boost_FIND_OPTIONS}
       )
   ENDIF( NOT Boost_INCLUDE_DIR )
   
@@ -722,7 +637,7 @@ ELSE (_boost_IN_CACHE)
     endif()
   endif(Boost_COMPILER)
 
-  set (_boost_MULTITHREADED "-mt")
+  SET (_boost_MULTITHREADED "-mt")
   if( NOT Boost_USE_MULTITHREADED )
     set (_boost_MULTITHREADED "")
   endif()
@@ -731,63 +646,32 @@ ELSE (_boost_IN_CACHE)
       "_boost_MULTITHREADED = ${_boost_MULTITHREADED}")
   endif()
 
-  #======================
-  # Systematically build up the Boost ABI tag
-  # http://boost.org/doc/libs/1_41_0/more/getting_started/windows.html#library-naming
-  set( _boost_RELEASE_ABI_TAG "-")
-  set( _boost_DEBUG_ABI_TAG   "-")
-  # Key       Use this library when:
-  #  s        linking statically to the C++ standard library and
-  #           compiler runtime support libraries.
-  if(Boost_USE_STATIC_RUNTIME)
-    set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}s")
-    set( _boost_DEBUG_ABI_TAG   "${_boost_DEBUG_ABI_TAG}s")
-  endif()
-  #  g        using debug versions of the standard and runtime
-  #           support libraries
-  if(WIN32)
-    if(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
+  SET( _boost_STATIC_TAG "")
+  set( _boost_ABI_TAG "")
+  IF (WIN32)
+    IF(MSVC OR "${CMAKE_CXX_COMPILER}" MATCHES "icl"
             OR "${CMAKE_CXX_COMPILER}" MATCHES "icpc")
-      set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}g")
-    endif()
-  endif()
-  #  y        using special debug build of python
-  if(Boost_USE_DEBUG_PYTHON)
-    set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}y")
-  endif()
-  #  d        using a debug version of your code
-  set(_boost_DEBUG_ABI_TAG "${_boost_DEBUG_ABI_TAG}d")
-  #  p        using the STLport standard library rather than the
-  #           default one supplied with your compiler
-  if(Boost_USE_STLPORT)
-    set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}p")
-    set( _boost_DEBUG_ABI_TAG   "${_boost_DEBUG_ABI_TAG}p")
-  endif()
-  #  n        using the STLport deprecated "native iostreams" feature
-  if(Boost_USE_STLPORT_DEPRECATED_NATIVE_IOSTREAMS)
-    set( _boost_RELEASE_ABI_TAG "${_boost_RELEASE_ABI_TAG}n")
-    set( _boost_DEBUG_ABI_TAG   "${_boost_DEBUG_ABI_TAG}n")
-  endif()
-
+      SET (_boost_ABI_TAG "g")
+    ENDIF()
+    IF( Boost_USE_STATIC_LIBS )
+      SET( _boost_STATIC_TAG "-s")
+    ENDIF( Boost_USE_STATIC_LIBS )
+  ENDIF(WIN32)
+  SET (_boost_ABI_TAG "${_boost_ABI_TAG}d")
   if(Boost_DEBUG)
     message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-      "_boost_RELEASE_ABI_TAG = ${_boost_RELEASE_ABI_TAG}")
+      "_boost_STATIC_TAG = ${_boost_STATIC_TAG}")
     message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-      "_boost_DEBUG_ABI_TAG = ${_boost_DEBUG_ABI_TAG}")
+      "_boost_ABI_TAG = ${_boost_ABI_TAG}")
   endif()
 
   # ------------------------------------------------------------------------
   #  Begin finding boost libraries
   # ------------------------------------------------------------------------
 
-  set(_boost_LIBRARY_SEARCH_DIRS_ALWAYS
+  SET(_boost_LIBRARIES_SEARCH_DIRS
     ${Boost_INCLUDE_DIR}/lib
     ${Boost_INCLUDE_DIR}/../lib
-    ${Boost_INCLUDE_DIR}/stage/lib
-    ${BOOST_ROOT}/lib
-    ${BOOST_ROOT}/stage/lib
-  )
-  set(_boost_LIBRARY_SEARCH_DIRS_SYSTEM
     C:/boost/lib
     C:/boost
     "$ENV{ProgramFiles}/boost/boost_${Boost_MAJOR_VERSION}_${Boost_MINOR_VERSION}_${Boost_SUBMINOR_VERSION}/lib"
@@ -796,138 +680,67 @@ ELSE (_boost_IN_CACHE)
     "$ENV{ProgramFiles}/boost"
     /sw/local/lib
   )
-  if( BOOST_ROOT )
-    if( Boost_NO_SYSTEM_PATHS )
-      set(_boost_LIBRARY_SEARCH_DIRS ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS})
-      set(_boost_FIND_OPTIONS NO_CMAKE_SYSTEM_PATH)
-    else()
-      set(_boost_LIBRARY_SEARCH_DIRS
-        ${_boost_LIBRARY_SEARCH_DIRS_ALWAYS}
-        ${_boost_LIBRARY_SEARCH_DIRS_SYSTEM})
-    endif()
-  endif( BOOST_ROOT )
+  IF( BOOST_ROOT )
+    SET(_boost_LIBRARIES_SEARCH_DIRS
+      ${BOOST_ROOT}/lib
+      ${BOOST_ROOT}/stage/lib
+      ${_boost_LIBRARIES_SEARCH_DIRS})
+  ENDIF( BOOST_ROOT )
 
-  if( BOOST_LIBRARYDIR )
+  IF( BOOST_LIBRARYDIR )
     file(TO_CMAKE_PATH ${BOOST_LIBRARYDIR} BOOST_LIBRARYDIR)
-    set(_boost_LIBRARY_SEARCH_DIRS
-      ${BOOST_LIBRARYDIR} ${_boost_LIBRARY_SEARCH_DIRS})
-  endif()
+    SET(_boost_LIBRARIES_SEARCH_DIRS
+      ${BOOST_LIBRARYDIR} ${_boost_LIBRARIES_SEARCH_DIRS})
+  ENDIF( BOOST_LIBRARYDIR )
 
   if(Boost_DEBUG)
     message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-      "_boost_LIBRARY_SEARCH_DIRS = ${_boost_LIBRARY_SEARCH_DIRS}")
-  endif()
-
-  # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
-  if( Boost_USE_STATIC_LIBS )
-    set( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
-    if(WIN32)
-      set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
-    else()
-      set(CMAKE_FIND_LIBRARY_SUFFIXES .a )
-    endif()
-  endif()
-
-  # We want to use the tag inline below without risking double dashes
-  if(_boost_RELEASE_ABI_TAG)
-    if(${_boost_RELEASE_ABI_TAG} STREQUAL "-")
-      set(_boost_RELEASE_ABI_TAG "")
-    endif()
+      "_boost_LIBRARIES_SEARCH_DIRS = ${_boost_LIBRARIES_SEARCH_DIRS}")
   endif()
-  if(_boost_DEBUG_ABI_TAG)
-    if(${_boost_DEBUG_ABI_TAG} STREQUAL "-")
-      set(_boost_DEBUG_ABI_TAG "")
-    endif()
-  endif()
-
-  # The previous behavior of FindBoost when Boost_USE_STATIC_LIBS was enabled
-  # on WIN32 was to:
-  #  1. Search for static libs compiled against a SHARED C++ standard runtime library (use if found)
-  #  2. Search for static libs compiled against a STATIC C++ standard runtime library (use if found)
-  # We maintain this behavior since changing it could break people's builds.
-  # To disable the ambiguous behavior, the user can
-  # set Boost_COMPAT_STATIC_RUNTIME to FALSE
-  set(_boost_STATIC_RUNTIME_WORKAROUND false)
-  if(Boost_COMPAT_STATIC_RUNTIME AND WIN32 AND Boost_USE_STATIC_LIBS)
-    if(NOT Boost_USE_STATIC_RUNTIME)
-      set(_boost_STATIC_RUNTIME_WORKAROUND true)
-    endif()
-  endif()
-
-
-  foreach(COMPONENT ${Boost_FIND_COMPONENTS})
-    string(TOUPPER ${COMPONENT} UPPERCOMPONENT)
-    set( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" )
-    set( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" )
-    set( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND")
 
-    #
-    # Find RELEASE libraries
-    #
-    set(_boost_RELEASE_NAMES
-      ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
-      ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
-      ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}-${Boost_LIB_VERSION}
-      ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_ABI_TAG}
-      ${Boost_LIB_PREFIX}boost_${COMPONENT} )
-    if(_boost_STATIC_RUNTIME_WORKAROUND)
-      set(_boost_RELEASE_STATIC_ABI_TAG "-s${_boost_RELEASE_ABI_TAG}")
-      list(APPEND _boost_RELEASE_NAMES
-        ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
-        ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}
-        ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
-        ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_RELEASE_STATIC_ABI_TAG} )
-    endif()
-    if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
-       _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_RELEASE_NAMES ${_boost_RELEASE_NAMES})
-    endif()
-    if(Boost_DEBUG)
-      message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                     "Searching for ${UPPERCOMPONENT}_LIBRARY_RELEASE: ${_boost_RELEASE_NAMES}")
-    endif()
-    find_library(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
-        NAMES ${_boost_RELEASE_NAMES}
-        HINTS ${_boost_LIBRARY_SEARCH_DIRS}
-        ${_boost_FIND_OPTIONS}
+  FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
+    STRING(TOUPPER ${COMPONENT} UPPERCOMPONENT)
+    SET( Boost_${UPPERCOMPONENT}_LIBRARY "Boost_${UPPERCOMPONENT}_LIBRARY-NOTFOUND" )
+    SET( Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE "Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE-NOTFOUND" )
+    SET( Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG "Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG-NOTFOUND")
+
+    # Support preference of static libs by adjusting CMAKE_FIND_LIBRARY_SUFFIXES
+    IF( Boost_USE_STATIC_LIBS )
+      SET( _boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+      IF(WIN32)
+        SET(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+      ELSE(WIN32)
+        SET(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+      ENDIF(WIN32)
+    ENDIF( Boost_USE_STATIC_LIBS )
+
+    FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_RELEASE
+        NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${Boost_LIB_VERSION}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}-${Boost_LIB_VERSION}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}
+        HINTS  ${_boost_LIBRARIES_SEARCH_DIRS}
     )
 
-    #
-    # Find DEBUG libraries
-    #
-    set(_boost_DEBUG_NAMES
-      ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
-      ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}
-      ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_ABI_TAG}-${Boost_LIB_VERSION}
-      ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}
-      ${Boost_LIB_PREFIX}boost_${COMPONENT} )
-    if(_boost_STATIC_RUNTIME_WORKAROUND)
-      set(_boost_DEBUG_STATIC_ABI_TAG "-s${_boost_DEBUG_ABI_TAG}")
-      list(APPEND _boost_DEBUG_NAMES
-        ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
-        ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}
-        ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG}-${Boost_LIB_VERSION}
-        ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_DEBUG_STATIC_ABI_TAG} )
-    endif()
-    if(Boost_THREADAPI AND ${COMPONENT} STREQUAL "thread")
-       _Boost_PREPEND_LIST_WITH_THREADAPI(_boost_DEBUG_NAMES ${_boost_DEBUG_NAMES})
-    endif()
-    if(Boost_DEBUG)
-      message(STATUS "[ ${CMAKE_CURRENT_LIST_FILE}:${CMAKE_CURRENT_LIST_LINE} ] "
-                     "Searching for ${UPPERCOMPONENT}_LIBRARY_DEBUG: ${_boost_DEBUG_NAMES}")
-    endif()
-    find_library(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
-        NAMES ${_boost_DEBUG_NAMES}
-        HINTS ${_boost_LIBRARY_SEARCH_DIRS}
-        ${_boost_FIND_OPTIONS}
+    FIND_LIBRARY(Boost_${UPPERCOMPONENT}_LIBRARY_DEBUG
+        NAMES  ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_COMPILER}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}-${Boost_LIB_VERSION}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}-${Boost_LIB_VERSION}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}-${_boost_ABI_TAG}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}${_boost_MULTITHREADED}${_boost_STATIC_TAG}${_boost_ABI_TAG}
+               ${Boost_LIB_PREFIX}boost_${COMPONENT}-${_boost_ABI_TAG}
+        HINTS  ${_boost_LIBRARIES_SEARCH_DIRS}
     )
 
     _Boost_ADJUST_LIB_VARS(${UPPERCOMPONENT})
-  endforeach(COMPONENT)
-
-  # Restore the original find library ordering
-  if( Boost_USE_STATIC_LIBS )
-    set(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
-  endif()
+    IF( Boost_USE_STATIC_LIBS )
+      SET(CMAKE_FIND_LIBRARY_SUFFIXES ${_boost_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
+    ENDIF( Boost_USE_STATIC_LIBS )
+  ENDFOREACH(COMPONENT)
   # ------------------------------------------------------------------------
   #  End finding boost libraries
   # ------------------------------------------------------------------------

-----------------------------------------------------------------------

Summary of changes:
 Modules/FindBoost.cmake |  345 +++++++++++------------------------------------
 1 files changed, 79 insertions(+), 266 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list