[Cmake-commits] [cmake-commits] hoffman committed CMakeSystemSpecificInformation.cmake 1.40.2.1 1.40.2.2 CheckCSourceCompiles.cmake 1.17 1.17.12.1 CheckCSourceRuns.cmake 1.10 1.10.2.1 CheckCXXSourceCompiles.cmake 1.14 1.14.12.1 CheckCXXSourceRuns.cmake 1.6 1.6.2.1 FindBoost.cmake 1.4.2.10 1.4.2.11

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Mar 27 11:55:59 EDT 2009


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

Modified Files:
      Tag: CMake-2-6
	CMakeSystemSpecificInformation.cmake 
	CheckCSourceCompiles.cmake CheckCSourceRuns.cmake 
	CheckCXXSourceCompiles.cmake CheckCXXSourceRuns.cmake 
	FindBoost.cmake 
Log Message:
ENH: merge in from main tree to create RC 2


Index: CheckCXXSourceCompiles.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CheckCXXSourceCompiles.cmake,v
retrieving revision 1.14
retrieving revision 1.14.12.1
diff -C 2 -d -r1.14 -r1.14.12.1
*** CheckCXXSourceCompiles.cmake	27 Aug 2006 15:19:25 -0000	1.14
--- CheckCXXSourceCompiles.cmake	27 Mar 2009 15:55:51 -0000	1.14.12.1
***************
*** 1,5 ****
! # - Check if the source code provided in the SOURCE argument compiles.
  # CHECK_CXX_SOURCE_COMPILES(SOURCE VAR)
! # - macro which checks if the source code compiles
  #  SOURCE - source code to try to compile
  #  VAR    - variable to store whether the source code compiled
--- 1,5 ----
! # - Check if the C++ source code provided in the SOURCE argument compiles.
  # CHECK_CXX_SOURCE_COMPILES(SOURCE VAR)
! #
  #  SOURCE - source code to try to compile
  #  VAR    - variable to store whether the source code compiled

Index: CheckCSourceRuns.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CheckCSourceRuns.cmake,v
retrieving revision 1.10
retrieving revision 1.10.2.1
diff -C 2 -d -r1.10 -r1.10.2.1
*** CheckCSourceRuns.cmake	28 Aug 2007 14:52:07 -0000	1.10
--- CheckCSourceRuns.cmake	27 Mar 2009 15:55:51 -0000	1.10.2.1
***************
*** 1,5 ****
! # - Check if the source code provided in the SOURCE argument compiles and runs.
  # CHECK_C_SOURCE_RUNS(SOURCE VAR)
! # - macro which checks if the source code runs
  #  SOURCE   - source code to try to compile
  #  VAR      - variable to store the result, 1 for success, empty for failure
--- 1,5 ----
! # - Check if the C source code provided in the SOURCE argument compiles and runs.
  # CHECK_C_SOURCE_RUNS(SOURCE VAR)
! #
  #  SOURCE   - source code to try to compile
  #  VAR      - variable to store the result, 1 for success, empty for failure

Index: CheckCSourceCompiles.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CheckCSourceCompiles.cmake,v
retrieving revision 1.17
retrieving revision 1.17.12.1
diff -C 2 -d -r1.17 -r1.17.12.1
*** CheckCSourceCompiles.cmake	4 Apr 2007 19:58:38 -0000	1.17
--- CheckCSourceCompiles.cmake	27 Mar 2009 15:55:50 -0000	1.17.12.1
***************
*** 1,5 ****
! # - Check if the source code provided in the SOURCE argument compiles.
  # CHECK_C_SOURCE_COMPILES(SOURCE VAR)
! # - macro which checks if the source code compiles
  #  SOURCE   - source code to try to compile
  #  VAR      - variable to store whether the source code compiled
--- 1,5 ----
! # - Check if the C source code provided in the SOURCE argument compiles.
  # CHECK_C_SOURCE_COMPILES(SOURCE VAR)
! #
  #  SOURCE   - source code to try to compile
  #  VAR      - variable to store whether the source code compiled

Index: CheckCXXSourceRuns.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CheckCXXSourceRuns.cmake,v
retrieving revision 1.6
retrieving revision 1.6.2.1
diff -C 2 -d -r1.6 -r1.6.2.1
*** CheckCXXSourceRuns.cmake	28 Aug 2007 14:52:07 -0000	1.6
--- CheckCXXSourceRuns.cmake	27 Mar 2009 15:55:52 -0000	1.6.2.1
***************
*** 1,5 ****
! # - Check if the source code provided in the SOURCE argument compiles and runs.
  # CHECK_CXX_SOURCE_RUNS(SOURCE VAR)
! # - macro which checks if the source code compiles
  #  SOURCE - source code to try to compile
  #  VAR    - variable to store the result, 1 for success, empty for failure
--- 1,5 ----
! # - Check if the C++ source code provided in the SOURCE argument compiles and runs.
  # CHECK_CXX_SOURCE_RUNS(SOURCE VAR)
! #
  #  SOURCE - source code to try to compile
  #  VAR    - variable to store the result, 1 for success, empty for failure

Index: CMakeSystemSpecificInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeSystemSpecificInformation.cmake,v
retrieving revision 1.40.2.1
retrieving revision 1.40.2.2
diff -C 2 -d -r1.40.2.1 -r1.40.2.2
*** CMakeSystemSpecificInformation.cmake	13 Jan 2009 18:03:49 -0000	1.40.2.1
--- CMakeSystemSpecificInformation.cmake	27 Mar 2009 15:55:47 -0000	1.40.2.2
***************
*** 36,39 ****
--- 36,77 ----
  
  
+ # The Eclipse generator needs to know the standard include path
+ # so that Eclipse ca find the headers at runtime and parsing etc. works better
+ # This is done here by actually running gcc with the options so it prints its
+ # system include directories, which are parsed then and stored in the cache.
+ IF("${CMAKE_EXTRA_GENERATOR}" MATCHES "Eclipse")
+ 
+   MACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang _result)
+     SET(${_result})
+     SET(_gccOutput)
+     FILE(WRITE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy" "\n" )
+     EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} -v -E -x ${_lang} dummy
+                    WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/CMakeFiles
+                    ERROR_VARIABLE _gccOutput
+                    OUTPUT_QUIET )
+     FILE(REMOVE "${CMAKE_BINARY_DIR}/CMakeFiles/dummy")
+ 
+     IF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" )
+       SET(${_result} ${CMAKE_MATCH_1})
+       STRING(REPLACE "\n" " " ${_result} "${${_result}}")
+       SEPARATE_ARGUMENTS(${_result})
+     ENDIF( "${_gccOutput}" MATCHES "> search starts here[^\n]+\n *(.+) *\n *End of (search) list" )
+   ENDMACRO(_DETERMINE_GCC_SYSTEM_INCLUDE_DIRS _lang)
+ 
+   # Now check for C
+   IF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU  AND NOT  CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS)
+     _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c _dirs)
+     SET(CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "C compiler system include directories")
+   ENDIF ("${CMAKE_C_COMPILER_ID}" MATCHES GNU  AND NOT  CMAKE_ECLIPSE_C_SYSTEM_INCLUDE_DIRS)
+ 
+   # And now the same for C++
+   IF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU  AND NOT  CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS)
+     _DETERMINE_GCC_SYSTEM_INCLUDE_DIRS(c++ _dirs)
+     SET(CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS "${_dirs}" CACHE INTERNAL "CXX compiler system include directories")
+   ENDIF ("${CMAKE_CXX_COMPILER_ID}" MATCHES GNU  AND NOT  CMAKE_ECLIPSE_CXX_SYSTEM_INCLUDE_DIRS)
+ 
+ ENDIF("${CMAKE_EXTRA_GENERATOR}" MATCHES "Eclipse")
+ 
+ 
  # for most systems a module is the same as a shared library
  # so unless the variable CMAKE_MODULE_EXISTS is set just

Index: FindBoost.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindBoost.cmake,v
retrieving revision 1.4.2.10
retrieving revision 1.4.2.11
diff -C 2 -d -r1.4.2.10 -r1.4.2.11
*** FindBoost.cmake	10 Feb 2009 22:28:07 -0000	1.4.2.10
--- FindBoost.cmake	27 Mar 2009 15:55:56 -0000	1.4.2.11
***************
*** 69,152 ****
  # ============================================================================
  #
! # Variables used by this module, they can change the default behaviour and need to be set
! # before calling find_package:
  #
! #  Boost_USE_MULTITHREADED       Can be set to OFF to use the non-multithreaded
  #                                boost libraries.  If not specified, defaults
  #                                to ON.
  #
! #  Boost_USE_STATIC_LIBS         Can be set to ON to force the use of the static
  #                                boost libraries. Defaults to OFF.
  #
  # Other Variables used by this module which you may want to set.
  #
! #  Boost_ADDITIONAL_VERSIONS     A list of version numbers to use for searching
  #                                the boost include directory.  Please see
  #                                the documentation above regarding this
  #                                annoying, but necessary variable :(
  #
! #  Boost_DEBUG                   Set this to TRUE to enable debugging output
  #                                of FindBoost.cmake if you are having problems.
  #                                Please enable this before filing any bug
  #                                reports.
  # 
! #  Boost_COMPILER                Set this to the compiler suffix used by Boost
! #                                (e.g. "-gcc43") if FindBoods has problems finding
  #                                the proper Boost installation
  #
! #  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.
  #
! #  BOOST_INCLUDEDIR              Set this to the include directory of Boost, if the
  #                                module has problems finding the proper Boost installation
  #
! #  BOOST_LIBRARYDIR              Set this to the lib directory of Boost, if the
  #                                module has problems finding the proper Boost installation
  #
  # Variables defined by this module:
  #
! #  Boost_FOUND                          System has Boost, this means the include dir was
  #                                       found, as well as all the libraries specified in
  #                                       the COMPONENTS list.
  #
! #  Boost_INCLUDE_DIRS                   Boost include directories: not cached
  #
! #  Boost_INCLUDE_DIR                    This is almost the same as above, but this one is
  #                                       cached and may be modified by advanced users
  #
! #  Boost_LIBRARIES                      Link these to use the Boost libraries that you
  #                                       specified: not cached
  #
! #  Boost_LIBRARY_DIRS                   The path to where the Boost library files are.
  #
! #  Boost_VERSION                        The version number of the boost libraries that
  #                                       have been found, same as in version.hpp from Boost
  #
! #  Boost_LIB_VERSION                    The version number in filename form as
  #                                       it's appended to the library filenames
  #
! #  Boost_MAJOR_VERSION                  major version number of boost
! #  Boost_MINOR_VERSION                  minor version number of boost
! #  Boost_SUBMINOR_VERSION               subminor version number of boost
  #
! #  Boost_LIB_DIAGNOSTIC_DEFINITIONS     [WIN32 Only] You can call
  #                                       add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINTIIONS})
  #                                       to have diagnostic information about Boost's
  #                                       automatic linking outputted during compilation time.
  #
! # For each component you list the following variables are set.
! # ATTENTION: The component names need to be in lower case, just as the boost
! # library names however the CMake variables use upper case for the component
! # part. So you'd get Boost_SERIALIZATION_FOUND for example.
  #
- #  Boost_${COMPONENT}_FOUND             True IF the Boost library "component" was found.
- #  Boost_${COMPONENT}_LIBRARY           The absolute path of the Boost library "component".
- #  Boost_${COMPONENT}_LIBRARY_DEBUG     The absolute path of the debug version of the
- #                                       Boost library "component".
- #  Boost_${COMPONENT}_LIBRARY_RELEASE   The absolute path of the release version of the
- #                                       Boost library "component"
  #
  #  Copyright (c) 2006-2008 Andreas Schneider <mail at cynapses.org>
--- 69,153 ----
  # ============================================================================
  #
! # Variables used by this module, they can change the default behaviour and
! # need to be set before calling find_package:
  #
! #   Boost_USE_MULTITHREADED      Can be set to OFF to use the non-multithreaded
  #                                boost libraries.  If not specified, defaults
  #                                to ON.
  #
! #   Boost_USE_STATIC_LIBS        Can be set to ON to force the use of the static
  #                                boost libraries. Defaults to OFF.
  #
  # Other Variables used by this module which you may want to set.
  #
! #   Boost_ADDITIONAL_VERSIONS    A list of version numbers to use for searching
  #                                the boost include directory.  Please see
  #                                the documentation above regarding this
  #                                annoying, but necessary variable :(
  #
! #   Boost_DEBUG                  Set this to TRUE to enable debugging output
  #                                of FindBoost.cmake if you are having problems.
  #                                Please enable this before filing any bug
  #                                reports.
  # 
! #   Boost_COMPILER               Set this to the compiler suffix used by Boost
! #                                (e.g. "-gcc43") if FindBoost has problems finding
  #                                the proper Boost installation
  #
! # 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.
  #
! #   BOOST_INCLUDEDIR             Set this to the include directory of Boost, if the
  #                                module has problems finding the proper Boost installation
  #
! #   BOOST_LIBRARYDIR             Set this to the lib directory of Boost, if the
  #                                module has problems finding the proper Boost installation
  #
  # Variables defined by this module:
  #
! #   Boost_FOUND                         System has Boost, this means the include dir was
  #                                       found, as well as all the libraries specified in
  #                                       the COMPONENTS list.
  #
! #   Boost_INCLUDE_DIRS                  Boost include directories: not cached
  #
! #   Boost_INCLUDE_DIR                   This is almost the same as above, but this one is
  #                                       cached and may be modified by advanced users
  #
! #   Boost_LIBRARIES                     Link to these to use the Boost libraries that you
  #                                       specified: not cached
  #
! #   Boost_LIBRARY_DIRS                  The path to where the Boost library files are.
  #
! #   Boost_VERSION                       The version number of the boost libraries that
  #                                       have been found, same as in version.hpp from Boost
  #
! #   Boost_LIB_VERSION                   The version number in filename form as
  #                                       it's appended to the library filenames
  #
! #   Boost_MAJOR_VERSION                 major version number of boost
! #   Boost_MINOR_VERSION                 minor version number of boost
! #   Boost_SUBMINOR_VERSION              subminor version number of boost
  #
! #   Boost_LIB_DIAGNOSTIC_DEFINITIONS    [WIN32 Only] You can call
  #                                       add_definitions(${Boost_LIB_DIAGNOSTIC_DEFINTIIONS})
  #                                       to have diagnostic information about Boost's
  #                                       automatic linking outputted during compilation time.
  #
! # For each component you specify in find_package(), the following (UPPER-CASE)
! # variables are set.  You can use these variables if you would like to pick and
! # choose components for your targets instead of just using Boost_LIBRARIES.
! #
! #   Boost_${COMPONENT}_FOUND            True IF the Boost library "component" was found.
! #
! #   Boost_${COMPONENT}_LIBRARY          Contains the libraries for the specified Boost
! #                                       "component" (includes debug and optimized keywords
! #                                       when needed).
! #
! # =====================================================================
  #
  #
  #  Copyright (c) 2006-2008 Andreas Schneider <mail at cynapses.org>
***************
*** 160,205 ****
  #
  
- IF(NOT DEFINED Boost_USE_MULTITHREADED)
-     SET(Boost_USE_MULTITHREADED TRUE)
- ENDIF()
  
- 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.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.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
- # user-friendly message when we fail to find some necessary piece of
- # Boost.
- set(Boost_ERROR_REASON)
  
  ############################################
  #
--- 161,169 ----
  #
  
  
  
+ #-------------------------------------------------------------------------------
+ #  FindBoost functions & macros
+ #
  ############################################
  #
***************
*** 211,214 ****
--- 175,179 ----
  # original authors of the FindQt4.cmake file. Only minor modifications were
  # made to remove references to Qt and make this file more generally applicable
+ # And ELSE/ENDIF pairs were removed for readability.
  #########################################################################
  
***************
*** 220,230 ****
        IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
          SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
!       ELSE(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
          # if there are no configuration types and CMAKE_BUILD_TYPE has no value
          # then just use the release libraries
          SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
!       ENDIF(CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
        SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
!     ENDIF (Boost_${basename}_LIBRARY_DEBUG AND Boost_${basename}_LIBRARY_RELEASE)
  
      # if only the release version was found, set the debug variable also to the release version
--- 185,196 ----
        IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
          SET(Boost_${basename}_LIBRARY optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
!       ELSE()
          # if there are no configuration types and CMAKE_BUILD_TYPE has no value
          # then just use the release libraries
          SET(Boost_${basename}_LIBRARY ${Boost_${basename}_LIBRARY_RELEASE} )
!       ENDIF()
!       # FIXME: This probably should be set for both cases
        SET(Boost_${basename}_LIBRARIES optimized ${Boost_${basename}_LIBRARY_RELEASE} debug ${Boost_${basename}_LIBRARY_DEBUG})
!     ENDIF()
  
      # if only the release version was found, set the debug variable also to the release version
***************
*** 233,237 ****
        SET(Boost_${basename}_LIBRARY       ${Boost_${basename}_LIBRARY_RELEASE})
        SET(Boost_${basename}_LIBRARIES     ${Boost_${basename}_LIBRARY_RELEASE})
!     ENDIF (Boost_${basename}_LIBRARY_RELEASE AND NOT Boost_${basename}_LIBRARY_DEBUG)
  
      # if only the debug version was found, set the release variable also to the debug version
--- 199,203 ----
        SET(Boost_${basename}_LIBRARY       ${Boost_${basename}_LIBRARY_RELEASE})
        SET(Boost_${basename}_LIBRARIES     ${Boost_${basename}_LIBRARY_RELEASE})
!     ENDIF()
  
      # if only the debug version was found, set the release variable also to the debug version
***************
*** 240,244 ****
        SET(Boost_${basename}_LIBRARY         ${Boost_${basename}_LIBRARY_DEBUG})
        SET(Boost_${basename}_LIBRARIES       ${Boost_${basename}_LIBRARY_DEBUG})
!     ENDIF (Boost_${basename}_LIBRARY_DEBUG AND NOT Boost_${basename}_LIBRARY_RELEASE)
      
      IF (Boost_${basename}_LIBRARY)
--- 206,210 ----
        SET(Boost_${basename}_LIBRARY         ${Boost_${basename}_LIBRARY_DEBUG})
        SET(Boost_${basename}_LIBRARIES       ${Boost_${basename}_LIBRARY_DEBUG})
!     ENDIF()
      
      IF (Boost_${basename}_LIBRARY)
***************
*** 255,259 ****
        set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory")
        SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found")
!     ENDIF (Boost_${basename}_LIBRARY)
  
    ENDIF (Boost_INCLUDE_DIR )
--- 221,225 ----
        set(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIRS} CACHE FILEPATH "Boost library directory")
        SET(Boost_${basename}_FOUND ON CACHE INTERNAL "Whether the Boost ${basename} library found")
!     ENDIF(Boost_${basename}_LIBRARY)
  
    ENDIF (Boost_INCLUDE_DIR )
***************
*** 266,269 ****
--- 232,237 ----
  ENDMACRO (_Boost_ADJUST_LIB_VARS)
  
+ #-------------------------------------------------------------------------------
+ 
  #
  # Runs compiler with "-dumpversion" and parses major/minor
***************
*** 282,291 ****
  ENDFUNCTION()
  
! 
  #-------------------------------------------------------------------------------
  
  
  SET( _boost_IN_CACHE TRUE)
  IF(Boost_INCLUDE_DIR)
    FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
      STRING(TOUPPER ${COMPONENT} COMPONENT)
--- 250,316 ----
  ENDFUNCTION()
  
! #
! # End functions/macros
! #  
  #-------------------------------------------------------------------------------
  
  
+ 
+ 
+ IF(NOT DEFINED Boost_USE_MULTITHREADED)
+     SET(Boost_USE_MULTITHREADED TRUE)
+ ENDIF()
+ 
+ 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.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.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
+ # user-friendly message when we fail to find some necessary piece of
+ # Boost.
+ set(Boost_ERROR_REASON)
+ 
  SET( _boost_IN_CACHE TRUE)
  IF(Boost_INCLUDE_DIR)
+ 
+   # On versions < 1.35, remove the System library from the considered list
+   # since it wasn't added until 1.35.
+   if(Boost_VERSION AND Boost_FIND_COMPONENTS)
+      math(EXPR _boost_maj "${Boost_VERSION} / 100000")
+      math(EXPR _boost_min "${Boost_VERSION} / 100 % 1000")
+      if(${_boost_maj}.${_boost_min} VERSION_LESS 1.35)
+        list(REMOVE_ITEM Boost_FIND_COMPONENTS system)
+      endif()
+   endif()
+ 
    FOREACH(COMPONENT ${Boost_FIND_COMPONENTS})
      STRING(TOUPPER ${COMPONENT} COMPONENT)
***************
*** 504,508 ****
    # Setting some more suffixes for the library
    SET (Boost_LIB_PREFIX "")
!   if ( MSVC AND Boost_USE_STATIC_LIBS )
      SET (Boost_LIB_PREFIX "lib")
    endif()
--- 529,533 ----
    # Setting some more suffixes for the library
    SET (Boost_LIB_PREFIX "")
!   if ( WIN32 AND Boost_USE_STATIC_LIBS )
      SET (Boost_LIB_PREFIX "lib")
    endif()



More information about the Cmake-commits mailing list