Commit Graph

105 Commits

Author SHA1 Message Date
Sergey Nikulov 4048f7cde0 FindBoost: Add latest Boost version 1.57.0 and next milestone 1.58.0 2015-01-13 08:59:13 -05:00
Nils Gladitz c930046410 FindBoost: Avoid if() quoted auto-dereference
When testing CMAKE_CXX_COMPILER[_ID] values with if(MATCHES) or
if(STREQUAL), do not explicitly dereference or quote the variable.
We want if() to auto-dereference the variable and not its value.
2014-10-06 09:40:41 -04:00
Brad King b1cbd577c1 FindBoost: Add -vc140 mangling for VS 14
Co-Author: Pawel Stopinski <diokhan@go2.pl>
2014-06-25 14:51:25 -04:00
Rolf Eike Beer b0b4b4602f Remove .* expressions from beginning and end of MATCHES regexs
All these expressions work the same:
  "foo"
  ".*foo.*"
  "^.*foo.*$"

This assumes that the "Intel*" expressions were meant to be "Intel.*".
2014-04-14 18:17:11 +02:00
Rolf Eike Beer 2622bc3f65 Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
The matches have already been calculated and can simply be taken from
CMAKE_MATCH_n variables. This avoids multiple compilations of the same or very
similar regular expressions.
2014-04-14 18:16:58 +02:00
Ben Boeckel f284b003d7 FindBoost: Search next to MPI libs for graph_parallel (#14832)
In addition to the MPI libraries, graph_parallel lives in the MPI libdir
as well.
2014-03-25 16:26:11 -04:00
Chuck Atkins 17485e37a2 FindBoost: Add suport for custom namespaces
When building boost with an alternate namespace the libraries generated
will have a different naming convention.  This is often done to ensure
no symbol conflicts with external libraries built against a different
version of boost.  If the namespace used is "myprivateboost::" instead
of "boost::" then the libraries built will be named myprivateboost_foo
instead of boost_foo.  Add an option to specify a custom namespace used
to alter the library names that get searched for.
2014-02-17 16:05:48 -05:00
Brad King a22eeca3fd FindBoost: Search next to MPI libraries for boost_mpi (#14739)
Some distributions place boost_mpi next to the MPI libraries against
which it was built instead of next to the other Boost libraries.  If
find_package(MPI) has already been run prior to find_package(Boost) then
MPI_CXX_LIBRARIES or MPI_C_LIBRARIES may be set to the location of the
MPI libraries.  Teach FindBoost.cmake to look there for boost_mpi and
boost_mpi_python after looking next to the other Boost libraries but
not consider the location to be Boost_LIBRARY_DIR.
2014-02-10 16:18:47 -05:00
Brad King d729899a26 FindBoost: Add Boost_USE_DEBUG_RUNTIME option (#14686)
Add an option to control use of the 'g' runtime debug library tag
on MSVC tools.  Default to ON to preserve existing behavior.
2014-01-08 11:32:17 -05:00
Brad King f53878b0d5 FindBoost: Clarify example static libs option (#13663)
State explicitly in the example that it will only find static libraries.
2013-11-01 11:24:06 -04:00
Brad King a42a66547b FindBoost: Refine .rst formatting
Move the '::' starting literal blocks to the end of the preceding
paragraph.  Convert the "Boost CMake" divider to a section header.
2013-11-01 11:24:06 -04:00
Kitware Robot f051814ed0 Convert builtin help to reStructuredText source files
Run the convert-help.bash script to convert documentation:

 ./convert-help.bash "/path/to/CMake-build/bin"

Then remove it.
2013-10-15 14:12:03 -04:00
Brad King 4e5cb398ae Merge branch 'master' into vs12-generator
Resolve conflicts in Tests/Preprocess/CMakeLists.txt by keeping
the side from 'master'.
2013-06-28 18:29:54 -04:00
Brad King 78fdbbcb41 FindBoost: Add -vc120 mangling for VS 12 2013-06-28 18:14:01 -04:00
Brad King 86cbd7312a FindBoost: Clarify failure on missing 'static' libs (#14235)
When Boost_USE_STATIC_LIBS is ON we may complain that Boost libraries
cannot be found even when shared libraries are present.  Update the
error message to tell the user explicitly that we want static libraries.

Suggested-by: Laurence R. McGlashan <laurence.mcglashan@gmail.com>
2013-06-20 17:10:13 -04:00
Brad King 1f73d65177 Merge topic 'FindBoost-normalize-slashes'
363825c FindBoost: Fix handling of \ in input paths (#14179)
2013-05-31 09:33:35 -04:00
Brad King 363825cd55 FindBoost: Fix handling of \ in input paths (#14179)
In commit 5b9149e0 (FindBoost: Overhaul caching and search repeat
behavior, 2012-09-24) we refactored the internal library search to use a
_Boost_FIND_LIBRARY macro to wrap around find_library calls.  However,
CMake macros re-process escape sequences when evaluating calls inside
the macro after substituting placeholders (a historical bug).  In order
to avoid escape sequences, convert backslashes to forward slashes before
passing arguments to the _Boost_FIND_LIBRARY macro.
2013-05-30 16:20:55 -04:00
Andreas Mohr bf019d765d Fix spelling and typos (non-binary) 2013-05-07 08:39:19 -04:00
Brad King 0496782418 FindBoost: Rewrite documentation
Write new documentation for this module.  Ensure that it formats
correctly in "cmake --help-module FindBoost" output.  Show the basic
form of calling find_package(Boost).  Document all result variables,
input variables, and cache variables appropriately grouped together.
Explain the search process and how it re-runs when changes are made.
Explain the difference between finding headers/libraries versus finding
a "Boost CMake" package configuraiton file.

Drop the emphasis on Boost_ADDITIONAL_VERSIONS because the
implementation should predict most future versions instead.
2012-09-27 11:08:21 -04:00
Brad King 4d92f6ca33 FindBoost: Refactor Boost_FOUND computation and version check
Construct an initial Boost_FOUND value immediately after searching for
Boost_INCLUDE_DIR.  Base the result only on whether header files for the
requested version were found.  Then after searching for component
libraries update Boost_FOUND based on whether all requested components
were found.
2012-09-27 11:07:51 -04:00
Brad King 0100f88e29 FindBoost: Construct a clean Boost_LIBRARIES value
Construct the value from scratch based on the component library list.
Avoid accumulating values from repeated find_package(Boost) calls.
If Boost is not found, Boost_LIBRARIES should be empty.
2012-09-27 11:04:20 -04:00
Brad King 5b9149e083 FindBoost: Overhaul caching and search repeat behavior
Overhaul the implementation as follows:

(1) Do not cache result variables such as Boost_VERSION,
Boost_LIB_VERSION, Boost_LIBRARY_DIRS, Boost_${COMPONENT}_FOUND,
Boost_${COMPONENT}_LIBRARY, or Boost_LIB_DIAGNOSTIC_DEFINITIONS that are
derived uniquely from other search results.  The user should not edit
them anyway.

(2) Add cache value Boost_LIBRARY_DIR to hold the single directory
expected to contain all libraries.  Once one library is found, search
only that directory for other libraries.

(3) Use the find_library NAMES_PER_DIR option to consider all possible
library names at the same time.

(4) Collect all documented input and cache variables and detect when
they have been changed by the user.  Discard prior search results that
may have been influenced by the changes and search for them again.
Environment variables are not expected to be persistent so use them only
as hints and do not consider changes to them to be meaningful.
2012-09-27 11:04:19 -04:00
Brad King 5ec8a69cac FindBoost: Use PATH_SUFFIXES to look in "Program Files"
The CMake find_path command looks under the proper "Program Files"
directories on Windows with any of the provided PATH_SUFFIXES.  This is
simpler and more robust than directly reading ENV{ProgramFiles}.  Once
Boost_INCLUDE_DIR has been located we already look next to it for the lib
directory anyway, so we do not need special help to find Boost libraries
under "Program Files".
2012-09-27 11:01:11 -04:00
Brad King d3260a46be FindBoost: Mark Boost_DIR cache entry as advanced 2012-09-26 11:10:17 -04:00
Brad King 531612d370 FindBoost: Remove extra indentation level
A large portion of the file was still indented for historical reasons.
2012-09-25 17:11:20 -04:00
Rolf Eike Beer 4be6783711 read less from version headers into variables
Instead of reading the whole file using file(READ) and later matching on the
whole file use file(STRINGS ... REGEX) to get only those lines we are
interested in at all. This will make the list much smaller (good for debugging)
and also the regular expressions will need to match on much smaller strings.

Also unset the content variables once they are not used anymore.
2012-08-19 13:54:56 +02:00
Kitware Robot 9db3116226 Remove CMake-language block-end command arguments
Ancient versions of CMake required else(), endif(), and similar block
termination commands to have arguments matching the command starting the
block.  This is no longer the preferred style.

Run the following shell code:

for c in else endif endforeach endfunction endmacro endwhile; do
    echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
egrep -z -v 'Tests/CMakeTests/While-Endwhile-' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Philip Lowman ca90709fd6 FindBoost: Future proof to 1.56 2012-06-30 03:40:37 -04:00
Philip Lowman accd0428f4 FindBoost: Fix bug where Boost_FOUND could be false when version specified
Fixes a problem where when specifying a version number without the REQUIRED
parameter, Boost_FOUND would be true on the first configure but false on
subsequent configures.
2012-06-30 03:33:56 -04:00
Rolf Eike Beer 63d4960aef FindBoost: add support for 1.49 and 1.50
Boost 1.49 has already be released. Add this and the next to come version
number to the search list.
2012-04-07 10:21:02 +02:00
David Cole cdf522436f FindBoost: Quote possibly empty string argument (#12273)
Author: Claudio Bley
2011-12-19 10:55:41 -05:00
Mateusz Loskot 1c4ba48e44 FindBoost: Use MSVC11 to find Boost on Windows (#12568)
While at it, add recent Boost versions.
2011-11-10 08:03:17 -05:00
Todd Gamblin 7da796d1fd 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
2011-09-01 15:00:21 -04:00
Philip Lowman 974374a9cd FindBoost: Also search for 1.46.1 2011-06-09 23:23:41 -04:00
Philip Lowman f26d1cf154 FindBoost: Fixes #12188
Workaround an issue where users wanted to use Boost_LIBRARIES with the
install() command and debug/optimized keywords were interfering.  Now
debug/optimized keywords are removed if the release & debug library
are the same.
2011-06-09 23:20:18 -04:00
Philip Lowman 5103fe58ee Lowercase all function names and improve consistency 2010-12-27 23:04:30 -05:00
Philip Lowman 97c8f77484 Fix spelling BOOST_LIBRARYDIR message. Add error for common misspellings. 2010-12-27 22:51:43 -05:00
Philip Lowman a80d6e9828 Add Boost 1.46 2010-12-13 01:21:46 -05:00
Philip Lowman 88babefbcc [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
2010-12-13 00:56:42 -05:00
Philip Lowman fffe1c07d9 11363: FindBoost.cmake fails to find debug libraries in tagged layout install 2010-10-28 22:51:18 -04:00
Philip Lowman b867a3f1a8 Remove superfluous variable Boost_COMPAT_STATIC_RUNTIME.
There is no need to introduce this extra variable as FindBoost
can simply rely on if Boost_USE_STATIC_RUNTIME is defined
or not to disable the old searching behavior for static runtime
libraries on WIN32.
2010-10-11 22:48:33 -04:00
Philip Lowman b8b9a32170 FindBoost.cmake: Fix library search path glitch introduced in earlier commit 2010-09-19 23:15:07 -04:00
Philip Lowman 90c16d84be FindBoost.cmake: Implements 11160
Add Boost_REALPATH option for people packaging Boost with their app:

Boost_REALPATH               Resolves symbolic links for discovered boost libraries
                             to assist with packaging.  For example, instead of
                             Boost_SYSTEM_LIBRARY_RELEASE being resolved to
                             "/usr/lib/libboost_system.so" it would be
                             "/usr/lib/libboost_system.so.1.42.0" instead.
                             This does not affect linking and should not be
                             enabled unless the user needs this information.
2010-09-18 11:57:42 -04:00
Philip Lowman 95ff12091d FindBoost.cmake: Fixes 10436
Add an additional library filename permutation which fixes
library detection for some custom builds of Boost.
2010-09-18 11:21:23 -04:00
Philip Lowman 5cce138c91 FindBoost.cmake: Fixes 11121
Add support for finding Boost.Thread with special THREADAPI in filename
2010-09-18 11:19:29 -04:00
Philip Lowman 02390416e1 FindBoost.cmake: Fixes 11246
FindBoost can find shared libraries (.so) in rare circumstances
even when Boost_USE_STATIC_LIBS is set
2010-09-18 11:16:09 -04:00
Philip Lowman d4900c2eca FindBoost.cmake: Fix compiling against a boost source tree
This fixes issues 11192 & 11187.
2010-09-18 10:59:42 -04:00
Philip Lowman 6ed7d9937a FindBoost.cmake: Add Boost_NO_SYSTEM_PATHS option
This fixes several duplicate issues in the tracker (7725, 11019, 8412)
2010-09-18 10:56:15 -04:00
Philip Lowman 16b0eb5ac5 FindBoost.cmake: Miscellaneous changes and refactoring
* Add a warning if the user sets Boost_ROOT which is not correct
* Clarify directions to the user for viewing debugging messages
* Move the CMAKE_FIND_LIBRARY_SUFFIXES tweak outside of a for loop
2010-09-18 10:41:53 -04:00