Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gtsam: add v4.2.0a9, update package options #17933

Merged
merged 29 commits into from
Aug 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
379f867
gtsam: add missing Boost::program_options requirement
valgur Jun 14, 2023
bca797e
gtsam: add transitive_headers/libs to deps
valgur Jun 14, 2023
b0d6a4a
gtsam: drop test_v1_package
valgur Jun 15, 2023
8538d81
gtsam: backport a patch for C++17 compatibility
valgur Jun 15, 2023
f764397
gtsam: add v4.2.0a9
valgur Jun 15, 2023
b0f8643
gtsam: update package options
valgur Jun 15, 2023
54774bb
gtsam: tweak formatting
valgur Jun 15, 2023
a1fc0f8
gtsam: get rid of a duplicate patch
valgur Jun 15, 2023
26e7ded
gtsam: handle `build_type_postfixes` option correctly
valgur Jun 15, 2023
2eaccc3
gtsam: correct metis lib name in 4.0
valgur Jun 15, 2023
5f37a67
gtsam: correct build_type_postfixes behavior
valgur Jun 15, 2023
559483f
gtsam: fix a bug in 4.2.0a9
valgur Jun 15, 2023
80e9e35
gtsam: add 'lib' prefix to libraries on Windows
valgur Jun 16, 2023
033a3a5
gtsam: add patch_source info to conandata.yml
valgur Jun 16, 2023
9159840
gtsam: apply "lib" prefix on Windows correctly
valgur Jun 16, 2023
1eb1af5
gtsam: drop v4.0.2
valgur Jun 19, 2023
3cc6138
gtsam: update onetbb and boost versions
valgur Jun 19, 2023
4a60b17
gtsam: better TBB validation
valgur Jun 19, 2023
6bc7b0a
gtsam: add tcmalloc support with gperftools
valgur Jun 19, 2023
d2df520
gtsam: fix Eigen version check
valgur Jun 19, 2023
6c396f6
gtsam: enable shared builds on Windows for v4.2
valgur Jun 20, 2023
656ba7e
gtsam: shared builds on Windows are broken in v4.2.0a9
valgur Jun 21, 2023
b4064b5
gtsam: document options with options_description
valgur Jun 27, 2023
e024fae
gtsam: add use_vendored_metis option
valgur Jun 27, 2023
c975fae
gtsam: simplify Conan v1 boilerplate
valgur Jun 27, 2023
ede170c
gtsam: improve default_allocator handling
valgur Jun 28, 2023
b9eccbe
gtsam: remove use_vendored_metis option
valgur Jul 21, 2023
6ef35f5
Merge branch 'master' into gtsam/recipe-fixes
franramirez688 Jul 26, 2023
8b7d26a
Merge branch 'master' into gtsam/recipe-fixes
franramirez688 Aug 3, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions recipes/gtsam/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
sources:
"4.2.0a9":
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@valgur I realized that the official version is 4.2a9, should not it be better to put the same one? Am I missing something?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I based it on the full version number in CMakeLists.txt: https://github.com/borglab/gtsam/blob/4.2a9/CMakeLists.txt#L10-L13
My reasoning was that the official release is going to be 4.2.0, so this would be slightly more consistent and would avoid potential ambiguity when sorting the version numbers.
I don't have anything against renaming it to 4.2a9 either, though.

url: "https://github.com/borglab/gtsam/archive/refs/tags/4.2a9.tar.gz"
sha256: "a9790e5132bfb2705a5985a1505c3cf9cdf95b711be8352ffa9a9299b279f2f8"
"4.1.1":
url: "https://github.com/borglab/gtsam/archive/4.1.1.tar.gz"
sha256: "c7b5e6cdad52b141c272778f47baf628975457be3e26ed96a7bc2ae685a00af0"
"4.0.3":
url: "https://github.com/borglab/gtsam/archive/4.0.3.tar.gz"
sha256: "eaa561749edf7a2d402981828253e28aed6c717dae35738301c5ab23e2595f25"
"4.0.2":
url: "https://github.com/borglab/gtsam/archive/4.0.2.tar.gz"
sha256: "8770a440f1af98c3f0d9d4dffd568de2d4c21b245e7231e987e26bc236aeb5aa"
patches:
"4.2.0a9":
- patch_file: "patches/4.1.1-0001-cmake-boost.patch"
patch_description: "Use boost targets"
patch_type: "conan"
- patch_file: "patches/4.2.0-0001-macos-rpath.patch"
patch_description: "Relocatable shared libs on Apple OS"
patch_type: "conan"
- patch_file: "patches/4.2.0-0002-eigen3-version.patch"
patch_description: "Get Eigen3 version info from Conan"
patch_type: "conan"
- patch_file: "patches/4.2.0a9-0001-fix-invalid-include.patch"
patch_description: "Fix an invalid include for pre-C++17 compatibility"
patch_type: "portability"
patch_source: "https://github.com/borglab/gtsam/pull/1545"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great catch! Thanks for porting it upstream :)

"4.1.1":
- patch_file: "patches/4.1.1-0001-cmake-boost.patch"
patch_description: "Use boost targets"
Expand All @@ -19,9 +33,12 @@ patches:
- patch_file: "patches/4.1.1-0003-macos-rpath.patch"
patch_description: "Relocatable shared libs on Apple OS"
patch_type: "conan"
- patch_file: "patches/4.0.2-0003-cmake-project.patch"
- patch_file: "patches/4.0.3-0004-cmake-project.patch"
patch_description: "CMake: move project() after cmake_minimum_required()"
patch_type: "conan"
- patch_file: "patches/4.1.1-0005-eigen3-version.patch"
patch_description: "Get Eigen3 version info from Conan"
patch_type: "conan"
"4.0.3":
- patch_file: "patches/4.0.3-0001-cmake-boost.patch"
patch_description: "Use boost targets"
Expand All @@ -32,19 +49,6 @@ patches:
- patch_file: "patches/4.0.3-0003-macos-rpath.patch"
patch_description: "Relocatable shared libs on Apple OS"
patch_type: "conan"
- patch_file: "patches/4.0.2-0003-cmake-project.patch"
patch_description: "CMake: move project() after cmake_minimum_required()"
patch_type: "conan"
"4.0.2":
- patch_file: "patches/4.0.2-0001-cmake-boost.patch"
patch_description: "Use boost targets"
patch_type: "conan"
- patch_file: "patches/4.0.2-0002-cmake-eigen.patch"
patch_description: "Use Eigen include variable from CMakeDeps"
patch_type: "conan"
- patch_file: "patches/4.0.2-0003-macos-rpath.patch"
patch_description: "Relocatable shared libs on Apple OS"
patch_type: "conan"
- patch_file: "patches/4.0.2-0003-cmake-project.patch"
- patch_file: "patches/4.0.3-0004-cmake-project.patch"
patch_description: "CMake: move project() after cmake_minimum_required()"
patch_type: "conan"
334 changes: 241 additions & 93 deletions recipes/gtsam/all/conanfile.py

Large diffs are not rendered by default.

61 changes: 0 additions & 61 deletions recipes/gtsam/all/patches/4.0.2-0001-cmake-boost.patch

This file was deleted.

20 changes: 0 additions & 20 deletions recipes/gtsam/all/patches/4.0.2-0002-cmake-eigen.patch

This file was deleted.

34 changes: 0 additions & 34 deletions recipes/gtsam/all/patches/4.0.2-0003-macos-rpath.patch

This file was deleted.

21 changes: 21 additions & 0 deletions recipes/gtsam/all/patches/4.1.1-0005-eigen3-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Otherwise the Eigen version detection will fail due to the Eigen path variable containing a generator expression.
diff --git a/cmake/HandleEigen.cmake b/cmake/HandleEigen.cmake
--- a/cmake/HandleEigen.cmake
+++ b/cmake/HandleEigen.cmake
@@ -46,6 +46,8 @@
endif()

# Detect Eigen version:
+set(GTSAM_EIGEN_VERSION "${Eigen3_VERSION_STRING}")
+if (FALSE)
set(EIGEN_VER_H "${GTSAM_EIGEN_INCLUDE_FOR_BUILD}/Eigen/src/Core/util/Macros.h")
if (EXISTS ${EIGEN_VER_H})
file(READ "${EIGEN_VER_H}" STR_EIGEN_VERSION)
@@ -67,6 +69,7 @@
else()
message(WARNING "Cannot determine Eigen version, missing file: `${EIGEN_VER_H}`")
endif ()
+endif()

if (MSVC)
if (BUILD_SHARED_LIBS)
30 changes: 30 additions & 0 deletions recipes/gtsam/all/patches/4.2.0-0001-macos-rpath.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,5 +5,4 @@ cmake_minimum_required(VERSION 3.0)
if(NOT DEFINED CMAKE_MACOSX_RPATH)
- set(CMAKE_MACOSX_RPATH 0)
endif()

# Set the version number for the library
--- a/cmake/HandleGlobalBuildFlags.cmake
+++ b/cmake/HandleGlobalBuildFlags.cmake
@@ -20,7 +20,6 @@ endif()

if (APPLE AND BUILD_SHARED_LIBS)
# Set the default install directory on macOS
- set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()

###############################################################################
--- a/gtsam/3rdparty/metis/libmetis/CMakeLists.txt
+++ b/gtsam/3rdparty/metis/libmetis/CMakeLists.txt
@@ -17,9 +17,6 @@ if(WIN32)
endif()

if (APPLE)
- set_target_properties(metis-gtsam PROPERTIES
- INSTALL_NAME_DIR
- "${CMAKE_INSTALL_PREFIX}/lib")
endif()

install(TARGETS metis-gtsam EXPORT GTSAM-exports
20 changes: 20 additions & 0 deletions recipes/gtsam/all/patches/4.2.0-0002-eigen3-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/cmake/HandleEigen.cmake b/cmake/HandleEigen.cmake
--- a/cmake/HandleEigen.cmake
+++ b/cmake/HandleEigen.cmake
@@ -59,6 +59,8 @@
endif()

# Detect Eigen version:
+set(GTSAM_EIGEN_VERSION "${Eigen3_VERSION_STRING}")
+if (FALSE)
set(EIGEN_VER_H "${GTSAM_EIGEN_INCLUDE_FOR_BUILD}/Eigen/src/Core/util/Macros.h")
if (EXISTS ${EIGEN_VER_H})
file(READ "${EIGEN_VER_H}" STR_EIGEN_VERSION)
@@ -80,6 +82,7 @@
else()
message(WARNING "Cannot determine Eigen version, missing file: `${EIGEN_VER_H}`")
endif ()
+endif()

if (MSVC)
if (BUILD_SHARED_LIBS)
12 changes: 12 additions & 0 deletions recipes/gtsam/all/patches/4.2.0a9-0001-fix-invalid-include.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/gtsam/sfm/DsfTrackGenerator.h b/gtsam/sfm/DsfTrackGenerator.h
--- a/gtsam/sfm/DsfTrackGenerator.h (revision c57988fe554e7213c77fe379c1d7c483de26ad33)
+++ b/gtsam/sfm/DsfTrackGenerator.h (revision 26a37d62103a9b3b828d36e8b1a76f875ed842e3)
@@ -22,7 +22,7 @@

#include <Eigen/Core>
#include <map>
-#include <optional>
+#include <boost/optional.hpp>
#include <vector>

namespace gtsam {
8 changes: 0 additions & 8 deletions recipes/gtsam/all/test_v1_package/CMakeLists.txt

This file was deleted.

17 changes: 0 additions & 17 deletions recipes/gtsam/all/test_v1_package/conanfile.py

This file was deleted.

4 changes: 2 additions & 2 deletions recipes/gtsam/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
versions:
"4.2.0a9":
folder: all
"4.1.1":
folder: all
"4.0.3":
folder: all
"4.0.2":
folder: all