- Previously all Ceres compile definitions were private to Ceres, that
is they were not exported to users via the CMake export mechanism.
- Now that we use compile definitions in public (installed) Ceres
headers, we need to export the Ceres compile definitions.
- If we did not do this, then the client's code 'see's' a different
version of the Ceres headers to those which were in fact compiled,
or in the case of shared_ptr, may not find the required header.
- This patch makes use of the new, in CMake 2.8.11, function:
target_compile_definitions() to export all of the Ceres compile
definitions using CMake's export functionality.
- For CMake versions < 2.8.11, we have to use the blunter instrument of
calling add_definitions() in CeresConfig.cmake (invoked by a call to
find_package(Ceres)). This is messy because it ends up adding the
Ceres compile definitions to any target declared in the user's code
after the call to find_package(Ceres). Although this should do no
harm as all of our defines are prefaced with CERES_, so any
unintentional name clashes are unlikely.
Change-Id: I5dea80949190eaf4fb08ea4ac568ce28c32dd4e0
This compiler defines shared_ptr in std::tr1 namespace, but
for this <tr1/memory> is to be included. Further, this compiler
also does have <memory> header which confused previous shared
pointer check.
Simplified logic around defines now, so currently we've got:
- CERES_TR1_MEMORY_HEADER defined if <tr1/memory> is to be
used for shared_ptr, otherwise <memory> is to be used.
- CERES_TR1_SHARED_PTR defined if shared_ptr is defined in
std::tr1 namespace, otherwise it's defined in std namespace.
All the shared_ptr checks are now moved to own file FindSharedPtr
which simplifies main CMakeLists.
Change-Id: I558a74793baaa0bd088801910a356be4ef17c31b
- Previously we relied on FindPackage() to define Ceres_FOUND when
find_package(Ceres) was called.
- This is fine, but users might legitimately expect the variable to be
CERES_FOUND given the form of CERES_INCLUDE_DIRS/LIBRARIES.
- As there is an inconsistency in the CMake recommended names when
FindPackage() is called in Module vs Config form, we now explicltly
define both.
Change-Id: I54bce9aa112b684d26b60a9ae4d11eb7925a6ee5
- The HINTS variables for gflags were incorrectly used as
GFLAGS_[INCLUDE/LIBRARY]_HINTS when they should have been
GFLAGS_[INCLUDE/LIBRARY]_DIR_HINTS as per the docs.
- Also removing a completed TODO in the main CMakeLists.
- Updating method of extracting current directory in CeresConfig.cmake
to avoid use of CMAKE_CURRENT_LIST_DIR, which was not present in
CMake =< v2.8.3.
Change-Id: I42ae696e3b785febe48688d912f0f343e8947cb0
- Previously on Windows the leaf include & lib install directories
passed to CeresConfig.cmake.in when configured where capitalised on
Windows.
- This capitalisation was incorrect, as the actual paths used are
specified in the install() statements and are always in the standard
lower-case form.
- This likely did not cause any issues previously as although NTFS is
case sensitive, the Win32 API is not, and most applications access
files through the Win32 API, and are thus not case-sensitive.
Change-Id: I335b6e2d10a1c64f320c2a1a68eeda1b22344e73
- Append to hint locations used by FindPackage scripts for public
dependencies (glog & Eigen) the locations of the dependencies when
Ceres was built.
- This means that the user should not have to supply them again when
using find_package(Ceres) even if they are installed in a
non-standard location.
Change-Id: I9550de91025ba47f01f1ea3c3fefe80fe38d14ff
- 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
- MSVC users can now choose whether to use the static or shared
C-Run Time (CRT) libraries explicitly.
- FindPackage() scripts now check that the lowercase libraries match
the expected library names, as Windows uses CamelCase for some
library names (other OSs don't).
Change-Id: Icbba5e9bf80181a5437e5009bdda1c12934bc6f3
- 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
1. Use CMake FindLAPACK and FindBLAS Modules.
2. Remove SEARCH_HEADERS and SEARCH_LIBS and replace them with
CMAKE variables. This leads to simplification of the FIND_LIBRARY
and FIND_PATH calls.
3. Make miniglog a fallback when glog is not present and the
user indicates MINIGLOG=OFF.
4. Add time.h to miniglog.
5. Remove shared library building.
Change-Id: I8a97156d3d7cf645fbbfe8e571761bc16c89f43f
* Doing 'make ceres_docs' can be used to create the documentation (if the BUILD_DOCUMENTATION=ON)
* Included the copyright boilerplate for FindSphinx.cmake
Change-Id: Iea21eba9e68384b4fe72c85fa88c76b0ba8a7a1d