* restrict boost dependencies to the ones used
* Also add googletest as a build dependency.
* Set GMOCK_INCLUDE_DIRS when doing src fallback.
Signed-off-by: Mikael Arguedas <mikael.arguedas@gmail.com>
Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Co-authored-by: Mikael Arguedas <mikael.arguedas@gmail.com>
This PR makes libcartographer build on Windows (including tests). Abseil was bumped to avoid a MSVC compiler bug.
I have observed two tests failing:
`MapBuilderTestByGridType/MapBuilderTestByGridType.GlobalSlam2D/1` and `MapBuilderTestByGridType/MapBuilderTestByGridType.LocalizationOnFrozenTrajectory2D/1`.
Got linker error for Abseil in the build env due to imprecise library order.
Worked fine on the dev machine though.
Maybe helps someone.
https://pastebin.com/raw/AEKPBt1n
Makes `common::Mutex` an alias for `absl::Mutex` and replaces the logic inside `common::MutexLocker` with `absl::MutexLock`.
A future PR can then remove these classes entirely and replace references to it across the Cartographer code base with the Abseil classes directly.
@pifon2a I've noticed the `BUILD_COMMAND` is broken. You're setting `ABSL_BUILD_COMMAND`, but using `ABSEIL_BUILD_COMMAND` (effectively empty). Somehow this doesn't confuse newer CMakes, but the one you install on Trusty gets confused and interprets this as a no-op build step. This causes the indigo pipeline in cartographer_ros to fail.
Use the cross-platform build command instead:
https://cmake.org/cmake/help/latest/module/ExternalProject.html#obtaining-project-properties (just above the linked paragraph)
Handle case with multiple invocations (avoid pasting ${CMAKE_THREAD_LIBS_INIT} multiple times).
Also check if target 'gmock' already exists before building GMock to avoid failures if GMock was already
find_packaged() from another subproject.
FIXES=https://github.com/googlecartographer/cartographer_ros/issues/776
- Pin versions of Ceres and protobuf (Fixes#341).
- Require Lua >= 5.2 (Fixes#629).
- No longer run ceres tests in CI. We implicitly test Ceres through Cartographer's tests and this saves ~4 minutes on CI.
This is required to reuse code from cartographer_ros in cartographer_rviz. Otherwise linking fails with errors like these:
~~~
/usr/bin/ld: libcartographer_ros.a(msg_conversion.cc.o): relocation R_X86_64_32S against `_ZNSs4_Rep20_S_empty_rep_storageE' can not be use
d when making a shared object; recompile with -fPIC
~~~
While this could be fixed locally in cartographer_ros, it is a reasonable default to compile with `-fPIC` always.
This is done by replacing CMAKE_*_DIR variables with PROJECT_*_ variables so
that CMake uses correct paths when libcartographer is a subproject
Move AllFiles.cmake into the project binary dir instead of the root CMake binary dir,
use a project-dependent detect_changes target name
This makes overriding it from an upper level CMakeLists.txt possible, which is required
when doing a super-build which doesn't require installing libcartographer.
The Boost include directory was not correctly added, and the
headers of the project where always looked up at the source or
build directory, not where they are installed.
Currently, on xenial/kinetic the transitive dependencies on
libcartographer and its dependencies are not duplicated after
each library that depends on it in the linker command.
Add dependencies via target_link_libraries as PUBLIC.
It seems the new behavior which defaults to PRIVATE was
used implicitly causing transitive dependencies to be
omitted.
- Remove use of get_property(LOCATION in cmake where this is easy. This
reduces build warnings sufficiently to not drown out other important
information.
- Mark cairo a dependency in package.xml so rosdep pulls it in.
Tested using docker -t ros:kinetic, which is based on Xenial.