-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17997 from Tobias-Fischer/gtsam_4.0.3_with_boost_…
…1.7.6 Add gtsam - take 3
- Loading branch information
Showing
6 changed files
with
200 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
mkdir build | ||
cd build | ||
|
||
cmake ^ | ||
-GNinja ^ | ||
-DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF ^ | ||
-DGTSAM_USE_SYSTEM_EIGEN=ON ^ | ||
-DGTSAM_INSTALL_CPPUNITLITE=OFF ^ | ||
-DGTSAM_BUILD_PYTHON=ON ^ | ||
-DBoost_USE_STATIC_LIBS=OFF ^ | ||
-DBOOST_ROOT="%LIBRARY_PREFIX%" ^ | ||
-DBoost_NO_SYSTEM_PATHS=ON ^ | ||
-DPython3_EXECUTABLE=%PYTHON% ^ | ||
-DPython_EXECUTABLE=%PYTHON% ^ | ||
-DPYTHON_EXECUTABLE=%PYTHON% ^ | ||
%SRC_DIR% | ||
|
||
ninja install | ||
|
||
@rem ninja check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
mkdir build | ||
cd build | ||
|
||
cmake .. ${CMAKE_ARGS} \ | ||
-GNinja \ | ||
-DGTSAM_BUILD_WITH_MARCH_NATIVE=OFF \ | ||
-DGTSAM_USE_SYSTEM_EIGEN=ON \ | ||
-DGTSAM_INSTALL_CPPUNITLITE=OFF \ | ||
-DGTSAM_BUILD_PYTHON=ON \ | ||
-DPython3_EXECUTABLE=$PYTHON \ | ||
-DPython_EXECUTABLE=$PYTHON \ | ||
-DPYTHON_EXECUTABLE=$PYTHON | ||
|
||
ninja install | ||
|
||
ninja check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
diff --git a/gtsam/base/serialization.h b/gtsam/base/serialization.h | ||
index 24355c684..e615afe83 100644 | ||
--- a/gtsam/base/serialization.h | ||
+++ b/gtsam/base/serialization.h | ||
@@ -25,6 +25,7 @@ | ||
#include <string> | ||
|
||
// includes for standard serialization types | ||
+#include <boost/serialization/version.hpp> | ||
#include <boost/serialization/optional.hpp> | ||
#include <boost/serialization/shared_ptr.hpp> | ||
#include <boost/serialization/vector.hpp> | ||
diff --git a/gtsam/linear/NoiseModel.h b/gtsam/linear/NoiseModel.h | ||
index 54b9d955f..a737c5cc8 100644 | ||
--- a/gtsam/linear/NoiseModel.h | ||
+++ b/gtsam/linear/NoiseModel.h | ||
@@ -27,6 +27,7 @@ | ||
#include <boost/serialization/extended_type_info.hpp> | ||
#include <boost/serialization/singleton.hpp> | ||
#include <boost/serialization/shared_ptr.hpp> | ||
+#include <boost/serialization/version.hpp> | ||
#include <boost/serialization/optional.hpp> | ||
|
||
namespace gtsam { | ||
diff --git a/gtsam/slam/SmartFactorBase.h b/gtsam/slam/SmartFactorBase.h | ||
index ddf56b289..f128bd124 100644 | ||
--- a/gtsam/slam/SmartFactorBase.h | ||
+++ b/gtsam/slam/SmartFactorBase.h | ||
@@ -30,6 +30,7 @@ | ||
#include <gtsam/geometry/CameraSet.h> | ||
|
||
#include <boost/optional.hpp> | ||
+#include <boost/serialization/version.hpp> | ||
#include <boost/serialization/optional.hpp> | ||
#include <boost/make_shared.hpp> | ||
#include <vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{% set name = "gtsam" %} | ||
{% set version = "4.1.1" %} | ||
|
||
package: | ||
name: gtsam | ||
version: '{{ version }}' | ||
|
||
source: | ||
url: https://github.com/borglab/gtsam/archive/refs/tags/{{ version }}.tar.gz | ||
sha256: c7b5e6cdad52b141c272778f47baf628975457be3e26ed96a7bc2ae685a00af0 | ||
patches: | ||
- nobuild-examples-timing.patch | ||
- fix-boost.patch | ||
build: | ||
number: 0 | ||
skip: True # [win] | ||
run_exports: | ||
- '{{ pin_subpackage(name, max_pin="x.x") }}' | ||
|
||
requirements: | ||
build: | ||
- '{{ compiler("c") }}' | ||
- '{{ compiler("cxx") }}' | ||
- ninja | ||
- cmake | ||
- pybind11 # [build_platform != target_platform] | ||
- numpy # [build_platform != target_platform] | ||
- python # [build_platform != target_platform] | ||
host: | ||
- python | ||
- boost-cpp | ||
- eigen | ||
- geographiclib-cpp | ||
- metis | ||
- suitesparse | ||
- tbb | ||
- tbb-devel | ||
- pybind11 | ||
- pyparsing | ||
- numpy | ||
run: | ||
- python | ||
- pyparsing | ||
- numpy | ||
- boost-cpp | ||
|
||
test: | ||
commands: | ||
- test -f ${PREFIX}/lib/libgtsam${SHLIB_EXT} # [not win] | ||
- test -f ${PREFIX}/lib/cmake/gtwrap/gtwrapConfig.cmake # [not win] | ||
- test -f ${PREFIX}/lib/cmake/GTSAM/GTSAMConfig.cmake # [not win] | ||
- test -f ${PREFIX}/include/gtsam/base/types.h # [not win] | ||
- if exist %PREFIX%\\Library\\include\\gtsam\\base\\types.h (exit 0) else (exit 1) # [win] | ||
- if exist $PREFIX$\\Library\\lib\\gtsam.lib (exit 0) else (exit 1) # [win] | ||
- if exist $PREFIX$\\Library\\bin\\gtsam.dll (exit 0) else (exit 1) # [win] | ||
|
||
|
||
about: | ||
home: https://github.com/borglab/gtsam | ||
summary: GTSAM is a library of C++ classes that implement smoothing and mapping (SAM) in robotics and vision | ||
license: BSD-3-Clause | ||
license_file: | ||
- LICENSE | ||
- LICENSE.BSD | ||
|
||
extra: | ||
recipe-maintainers: | ||
- wolfv | ||
- ameysutavani | ||
- TobiasFischer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index edefbf2ea..45e1e3d79 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -435,10 +435,10 @@ add_subdirectory(gtsam) | ||
add_subdirectory(tests) | ||
|
||
# Build examples | ||
-add_subdirectory(examples) | ||
+# add_subdirectory(examples) | ||
|
||
# Build timing | ||
-add_subdirectory(timing) | ||
+# add_subdirectory(timing) | ||
|
||
# Build gtsam_unstable | ||
if (GTSAM_BUILD_UNSTABLE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
diff --git a/gtsam/3rdparty/CMakeLists.txt b/gtsam/3rdparty/CMakeLists.txt | ||
index c8fecc339..419100863 100644 | ||
--- a/gtsam/3rdparty/CMakeLists.txt | ||
+++ b/gtsam/3rdparty/CMakeLists.txt | ||
@@ -53,7 +53,9 @@ if(GTSAM_SUPPORT_NESTED_DISSECTION) | ||
add_subdirectory(metis) | ||
endif() | ||
|
||
-add_subdirectory(ceres) | ||
+# add_subdirectory(ceres) | ||
+find_package(Ceres REQUIRED) | ||
+include_directories(${CERES_INCLUDE_DIRS}) | ||
|
||
############ NOTE: When updating GeographicLib be sure to disable building their examples | ||
############ and unit tests by commenting out their lines: | ||
diff --git a/gtsam/3rdparty/ceres/example.h b/gtsam/3rdparty/ceres/example.h | ||
index 6b051fce0..a3168fdb4 100644 | ||
--- a/gtsam/3rdparty/ceres/example.h | ||
+++ b/gtsam/3rdparty/ceres/example.h | ||
@@ -33,7 +33,7 @@ | ||
|
||
#pragma once | ||
|
||
-#include <gtsam/3rdparty/ceres/rotation.h> | ||
+#include <ceres/rotation.h> | ||
|
||
// Templated pinhole camera model for used with Ceres. The camera is | ||
// parameterized using 9 parameters: 3 for rotation, 3 for translation, 1 for | ||
diff --git a/gtsam/nonlinear/AdaptAutoDiff.h b/gtsam/nonlinear/AdaptAutoDiff.h | ||
index 682cca29a..a8ce86dd4 100644 | ||
--- a/gtsam/nonlinear/AdaptAutoDiff.h | ||
+++ b/gtsam/nonlinear/AdaptAutoDiff.h | ||
@@ -20,7 +20,7 @@ | ||
|
||
#include <gtsam/base/VectorSpace.h> | ||
#include <gtsam/base/OptionalJacobian.h> | ||
-#include <gtsam/3rdparty/ceres/autodiff.h> | ||
+#include <ceres/internal/autodiff.h> | ||
|
||
#include <boost/static_assert.hpp> | ||
#include <boost/type_traits/is_base_of.hpp> |