- Protect against the case when the user has multiple installs of TBB
in their search paths and the first install does not contain debug
libraries. In this case it is possible to get mismatched versions
of TBB inserted into TBB_LIBRARIES.
- Also suppresses warning about use of TBB_ROOT on modern versions of
CMake due to CMP0074.
Change-Id: I2eaafdde4a028cbf6c500c63771973d85bc4723d
- Adding the Homebrew install prefix to CMAKE_PREFIX_PATH, irrespective
of whether it is a standard location (e.g. /usr/local) overrides any
user-specified HINTS locations according to the search order of
CMake's find_xxx() functions.
- Now we append the relevant include/lib directory to its respective
HINTS directory variable (to the back to avoid overriding any user
specified values). This achieves the same effect, but only after
searching any user specified values.
- Also adds Homebrew install prefix to find_package() calls for
dependencies optionally exported with CMake after the possible user
specified <DEPENDENCY_NAME>_DIR prefix.
- Raised as issue #431
Change-Id: I47030f0f4fd9b96665fac57279be2285d9700b9a
- In light of the C++11 threads threading option this is no longer
necessary for cross-platform threading support and did not offer a
noticeable performance gain over either the C++11 threads
implementation or OpenMP.
Change-Id: Icb588d520888c19a1775171795b55bcaffb3d256
- Update FindSuiteSparse to use FindTBB.cmake to find TBB.
- Fix logic handling of TBB=ON if TBB is not found to continue with
build after disabling TBB rather than throwing a fatal error.
- Use TBB_LIBRARIES instead of TBB_tbb_LIBRARY as a Ceres dependency,
the former also includes the TBB malloc library.
- Add warning message about GPL licensing if TBB version < 2017.
- Add ‘TBB’ & ‘Mulithreading’ component options to find_package(Ceres),
where ‘Mulithreading’ is equivalent to ‘TBB’ || ‘OpenMP’.
Change-Id: Ifc7f1d01b050ba6e2097ad1913b178805df4769a
The FindSuiteSparse.cmake refactor had a typo where CCOLAMD
and COLAMD were conflated.
Thanks to @jasjuang for reporting this issue and finding the exact
commit where this bug was introduced.
Change-Id: If8ef6624df3b8b2fd7f0861eafc4700173401435
- As reported as Issue #285, previously we passed user-specified hint
locations as PATHS to find_path/library which means that they are
searched after system locations. Now we pass them as HINTS, which are
searched before system locations.
- Also clean-up FindSuiteSparse to replace repeated code for finding
each component with a common macro.
Change-Id: I20a1f905d929a23037b1d0b7fb7ffe817abaa3e3
- This protects against a client project which invokes
find_package(Ceres) after having called find_package(Foo) with their
own version of FindFoo.cmake which conflicts with Ceres’ exported
version and defines FOO_FOUND, but not the other variables Ceres’
FindFoo.cmake is expecting which can break the detection logic.
Change-Id: I9fe7bfa8a34bb58b09ffe34446da973912cf5587
- This could result in potentially confusing output if dependencies
were found with the QUIET option: "XXX not found due to ...", followed
by "found <part of> XXX".
- If find_package() was called with REQUIRED, then a FATAL_ERROR was
triggered in the xxx_not_found() macros, resulting in early
termination.
Change-Id: Ibf59afd10067b9debd1a5e15f735a41b61bed52e
- Updated to new CMake style where function names are all lowercase,
this will be backwards compatible as CMake function names are
case insensitive.
- Updated using Emacs' M-x unscreamify-cmake-buffer.
Change-Id: If7219816f560270e59212813aeb021353a64a0e2
- On MSVC, a Ceres dependency such as glog, may be named glog.lib, or
libglog.lib. By default, CMake assumes no prefix for libraries on
MSVC when using find_library(), thus find_library(glog) would fail
if glog was named libglog.lib.
- This patch caches & updates CMAKE_FIND_LIBRARY_PREFIXES in all of
Ceres' find_package scripts to include lib & "" (no prefix) on MSVC
and then returns CMAKE_FIND_LIBRARY_PREFIXES to its original state
before returning.
Change-Id: Ic82799e3b786cfb7228a51183bc189578b072bbe
Since Ceres is moving to using GitHub for issues, and the Google
Code URL in the current copyright header will soon become invalid,
update all the headers.
Change-Id: I1fce70375d1bcf098591f07b4d8f01a5c1e0789c
- Without quotations, on Yosemite, CMake will fail on first configure,
but will then work fine subsequently. This is because if the
HELPSTRING property is empty, without "" quotes, it is removed from
the arguments list for set().
Change-Id: Ia60444695e9770b947f145a54e949c9eeae67fbb
- Automatically generated failure message now provides more
information as to which sub-modules are missing.
Change-Id: I6eed94af49263540b8f87917b75c41b8f49658a0
- Now when find_package() is called for a dependency without the
REQUIRED or QUIET qualifiers, we emit no priority (above STATUS, but
below WARNING) messages and continue.
Change-Id: I8cdeda7a8f6c91d45fb7f24fb366244c6c9b66e1
- Also flipping ordering of variables in
find_package_handle_standard_args() so that the automatically
generated message prints the include directories, not TRUE.
Change-Id: I2bf62eacd5c96f27152e9542b9a74651243a584e
- Previously we used message priority: SEND_ERROR when a package was
not found and find_package() was called without QUIET or REQUIRED,
which emits an error message, and prevents generation, but continues
configuration.
- The fact SEND_ERROR induces an error message was confusing for users
as it implies that something bad has happened and they cannot
continue, when in fact we were disabling the option in question
and were thus able to continue, all they had to do was re-configure.
- This commit also reorders the search lists for includes/libraries
so that we always search user installed locations (e.g. /usr/local)
before system installed locations. Thus we will now always prefer
a user install to a system install if both are available, which is
likely to be the users desired intention.
Change-Id: Ide84919f27d3373f31282f70c685720cd77a6723
- Adding FindPackage scripts for all of Ceres dependencies.
- Moving depend.cmake contents to CeresConfig.cmake and cleaning up
search for Ceres & required dependencies, no longer push Ceres
options into client.
- Fixing uninstall to remove ceres include root directory.
- Fixing main CMakeLists to install miniglog header if enabled.
- Making miniglog library shared/static with Ceres library.
Change-Id: If926bebd11720230c5136597ccba672394ed9777
- Prior to CMake 2.8.10.2 FindPackageHandleStandardArgs was safe if
passed <LIBRARY>_FOUND as a variable to validate, this is no longer
true for newer CMake releases.
- Also adding missing SUITESPARSEQR_FOUND requirement for
SUITESPARSE_FOUND.
Change-Id: I0fdde56585fc736bdfbf433901ad17ee9f1cc216
- Also marking all library and include directories found via
find_library/path advanced (not directly visible in CMake GUI unless
toggled to show advanced options).
- Updating documentation to reflect SuiteSparse requirements on Ubuntu
and ability to control build options in CMake GUI.
- Splitting out all SuiteSparse related find_XX directives into a
FindSuiteSparse script.
Change-Id: I0d69e02392ec547a7c365ba3e06f2ebc61cacf16