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

[ceres + downstreams] Update to ceres to 2.2.0 #42475

Merged
merged 70 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
19a3b89
[ceres] Update to port version 2.2.0
ahojnnes Dec 2, 2024
41e4fc1
d
ahojnnes Dec 2, 2024
e185abc
d
ahojnnes Dec 2, 2024
73c312a
d
ahojnnes Dec 2, 2024
ba5ccff
d
ahojnnes Dec 3, 2024
7bcc754
d
ahojnnes Dec 3, 2024
14e6951
d
ahojnnes Dec 3, 2024
68bea46
d
ahojnnes Dec 3, 2024
adbc51b
cartographer
ahojnnes Dec 4, 2024
73085c9
d
ahojnnes Dec 4, 2024
732c856
d
ahojnnes Dec 4, 2024
31b6e60
d
ahojnnes Dec 4, 2024
766d336
d
ahojnnes Dec 4, 2024
7d3b7d5
d
ahojnnes Dec 4, 2024
c9242c4
d
ahojnnes Dec 4, 2024
4dd9d75
d
ahojnnes Dec 4, 2024
df13a95
Merge branch 'master' of https://github.com/microsoft/vcpkg into user…
ahojnnes Dec 4, 2024
0256b96
openturns
ahojnnes Dec 4, 2024
823ed58
d
ahojnnes Dec 4, 2024
41dc988
d
ahojnnes Dec 4, 2024
476dacf
d
ahojnnes Dec 4, 2024
e7a4007
d
ahojnnes Dec 4, 2024
343d558
d
ahojnnes Dec 4, 2024
87cc0e3
d
ahojnnes Dec 4, 2024
0d8fbbe
d
ahojnnes Dec 4, 2024
874459b
d
ahojnnes Dec 4, 2024
3e90198
d
ahojnnes Dec 4, 2024
61edee3
d
ahojnnes Dec 4, 2024
3a01806
d
ahojnnes Dec 4, 2024
a1b6112
d
ahojnnes Dec 4, 2024
7663800
d
ahojnnes Dec 4, 2024
7a949a7
d
ahojnnes Dec 4, 2024
b3f4dcd
d
ahojnnes Dec 4, 2024
5d3f0c9
d
ahojnnes Dec 4, 2024
da61845
d
ahojnnes Dec 4, 2024
7066000
d
ahojnnes Dec 4, 2024
7e5f6f7
d
ahojnnes Dec 4, 2024
3451349
d
ahojnnes Dec 5, 2024
abd2334
d
ahojnnes Dec 5, 2024
6d436bc
d
ahojnnes Dec 5, 2024
2cab7a0
d
ahojnnes Dec 5, 2024
a5b3f9a
d
ahojnnes Dec 5, 2024
7c04c60
d
ahojnnes Dec 5, 2024
f85d663
d
ahojnnes Dec 5, 2024
88cbb02
d
ahojnnes Dec 5, 2024
c65ee75
d
ahojnnes Dec 5, 2024
3efe26c
d
ahojnnes Dec 5, 2024
0a52491
d
ahojnnes Dec 5, 2024
3bbe299
d
ahojnnes Dec 5, 2024
8952607
d
ahojnnes Dec 5, 2024
217782b
d
ahojnnes Dec 5, 2024
30a17dc
d
ahojnnes Dec 5, 2024
6e1e657
d
ahojnnes Dec 5, 2024
303130f
d
ahojnnes Dec 6, 2024
91494ff
d
ahojnnes Dec 6, 2024
9b9c7f4
d
ahojnnes Dec 6, 2024
eb518c6
cr
ahojnnes Dec 6, 2024
dacc456
d
ahojnnes Dec 6, 2024
79d503d
fix ceres
ahojnnes Dec 10, 2024
503648f
d
ahojnnes Dec 10, 2024
5bc2afd
fix
ahojnnes Dec 10, 2024
03c42f4
d
ahojnnes Dec 10, 2024
db5a5e9
Merge remote-tracking branch 'origin/master' into HEAD
BillyONeal Dec 11, 2024
edf9d08
Deindex theia and cartrographer on the grounds that they require huge…
BillyONeal Dec 11, 2024
b5b3e51
Update ports/openmvg/portfile.cmake
ahojnnes Dec 11, 2024
278d047
d
ahojnnes Dec 11, 2024
4301643
d
ahojnnes Dec 11, 2024
c0d750d
Merge branch 'master' of https://github.com/microsoft/vcpkg into user…
ahojnnes Dec 13, 2024
6b564c2
d
ahojnnes Dec 13, 2024
54ea59f
d
ahojnnes Dec 13, 2024
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
58 changes: 52 additions & 6 deletions ports/ceres/0001_cmakelists_fixes.patch
Original file line number Diff line number Diff line change
@@ -1,11 +1,48 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 33e98b1..f275d68 100644
index 8e49c19e..707dfb9c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -426,27 +426,7 @@ if (MINIGLOG)
@@ -292,7 +292,7 @@ if (SUITESPARSE)
# built with SuiteSparse support.

# Check for SuiteSparse and dependencies.
- find_package(SuiteSparse 4.5.6 COMPONENTS CHOLMOD SPQR
+ find_package(SuiteSparse 4.5.6 CONFIG COMPONENTS CHOLMOD SPQR
OPTIONAL_COMPONENTS Partition)
if (SuiteSparse_FOUND)
set(SuiteSparse_DEPENDENCY "find_dependency(SuiteSparse ${SuiteSparse_VERSION})")
@@ -301,11 +301,11 @@ if (SUITESPARSE)
message("-- Found SuiteSparse ${SuiteSparse_VERSION}, "
"building with SuiteSparse.")

- if (SuiteSparse_NO_CMAKE OR NOT SuiteSparse_DIR)
+ if (SuiteSparse_NO_CMAKE OR NOT SuiteSparse_DIR)
install(FILES ${Ceres_SOURCE_DIR}/cmake/FindSuiteSparse.cmake
${Ceres_SOURCE_DIR}/cmake/FindMETIS.cmake
DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR})
- endif (SuiteSparse_NO_CMAKE OR NOT SuiteSparse_DIR)
+ endif (0)
else (SuiteSparse_FOUND)
# Disable use of SuiteSparse if it cannot be found and continue.
message("-- Did not find all SuiteSparse dependencies, disabling "
@@ -395,9 +395,10 @@ endif()
# GFlags.
if (GFLAGS)
# Don't search with REQUIRED as we can continue without gflags.
- find_package(gflags 2.2.0)
+ find_package(gflags CONFIG REQUIRED)
if (gflags_FOUND)
- if (TARGET gflags)
+ if (TARGET gflags::gflags)
+ add_library(gflags ALIAS gflags::gflags)
message("-- Found Google Flags (gflags) version ${gflags_VERSION}: ${gflags_DIR}")
else()
message("-- Detected version of gflags: ${gflags_VERSION} does not define "
@@ -430,28 +431,7 @@ if (MINIGLOG)
mark_as_advanced(FORCE GLOG_INCLUDE_DIR
GLOG_LIBRARY)
else (MINIGLOG)
unset(MINIGLOG_MAX_LOG_LEVEL CACHE)
- unset(MINIGLOG_MAX_LOG_LEVEL CACHE)
- # Don't search with REQUIRED so that configuration continues if not found and
- # we can output an error messages explaining MINIGLOG option.
- find_package(Glog)
Expand All @@ -29,9 +66,18 @@ index 33e98b1..f275d68 100644
- message("-- Found Google Log (glog)." ${GLOG_GFLAGS_DEPENDENCY_MESSAGE})
+ find_package(Glog REQUIRED)
endif (MINIGLOG)

if (NOT SCHUR_SPECIALIZATIONS)
@@ -760,12 +740,6 @@ install(FILES "${Ceres_BINARY_DIR}/CeresConfig-install.cmake"
@@ -466,7 +446,7 @@ endif (NOT CUSTOM_BLAS)

if (BUILD_BENCHMARKS)
# Version 1.3 was first to provide import targets
- find_package(benchmark 1.3 QUIET)
+ find_package(benchmark CONFIG REQUIRED)
if (benchmark_FOUND)
message("-- Found Google benchmark library. Building Ceres benchmarks.")
else()
@@ -722,12 +702,6 @@ install(FILES "${Ceres_BINARY_DIR}/CeresConfig-install.cmake"
DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR})
install(FILES "${Ceres_BINARY_DIR}/CeresConfigVersion.cmake"
DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR})
Expand All @@ -41,6 +87,6 @@ index 33e98b1..f275d68 100644
- install(FILES "${Ceres_SOURCE_DIR}/cmake/FindGlog.cmake"
- DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR})
-endif()

if (PROVIDE_UNINSTALL_TARGET)
# Create an uninstall target to remove all installed files.
8 changes: 4 additions & 4 deletions ports/ceres/0002_use_glog_target.patch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
diff --git a/internal/ceres/CMakeLists.txt b/internal/ceres/CMakeLists.txt
index 0e33263..299b373 100644
index f9fc2415..0aaabe4d 100644
--- a/internal/ceres/CMakeLists.txt
+++ b/internal/ceres/CMakeLists.txt
@@ -101,17 +101,9 @@ endif()
find_package(Threads QUIET)
list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES Threads::Threads)
@@ -85,17 +85,9 @@ endif (SCHUR_SPECIALIZATIONS)
set_source_files_properties(${CERES_INTERNAL_SCHUR_FILES} PROPERTIES
SKIP_UNITY_BUILD_INCLUSION ON)

-if (NOT MINIGLOG AND GLOG_FOUND)
- list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES ${GLOG_LIBRARIES})
Expand Down
19 changes: 14 additions & 5 deletions ports/ceres/0003_fix_exported_ceres_config.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
diff --git a/cmake/CeresConfig.cmake.in b/cmake/CeresConfig.cmake.in
index 4745483..b55462d 100644
index ceb7e269..de302f59 100644
--- a/cmake/CeresConfig.cmake.in
+++ b/cmake/CeresConfig.cmake.in
@@ -217,55 +217,14 @@ else (Eigen3_FOUND)
@@ -195,7 +195,7 @@ set(CERES_EIGEN_VERSION @Eigen3_VERSION@)
# Search quietly to control the timing of the error message if not found. The
# search should be for an exact match, but for usability reasons do a soft
# match and reject with an explanation below.
-find_package(Eigen3 ${CERES_EIGEN_VERSION} QUIET)
+find_package(Eigen3 CONFIG ${CERES_EIGEN_VERSION} QUIET)
Copy link
Contributor

Choose a reason for hiding this comment

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

find_package calls should never be QUIET in vcpkg

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If you look at the next few lines in the original config file, you will find that it is not really quiet but it fails if the find_package call was unsuccessful. It has some custom logic that alters internal variables. I suggest keeping the patch minimal, as the behavior will be the same.

if (Eigen3_FOUND)
if (NOT Eigen3_VERSION VERSION_EQUAL CERES_EIGEN_VERSION)
# CMake's VERSION check in FIND_PACKAGE() will accept any version >= the
@@ -217,55 +217,13 @@ else (Eigen3_FOUND)
endif (Eigen3_FOUND)

# glog (and maybe gflags).
Expand Down Expand Up @@ -35,14 +44,14 @@ index 4745483..b55462d 100644
- # Search quietly s/t we control the timing of the error message if not found.
- find_package(Glog QUIET)
- endif()
-
- if (GLOG_FOUND)
- ceres_message(STATUS "Found required Ceres dependency: glog")
- else()
- ceres_report_not_found("Missing required Ceres dependency: glog.")
- endif()
+include (CMakeFindDependencyMacro)
+find_dependency (glog NO_MODULE)
+include(CMakeFindDependencyMacro)
+find_dependency(glog NO_MODULE)

- # gflags is only a public dependency of Ceres via glog, thus is not required
- # if Ceres was built with MINIGLOG.
Expand Down
112 changes: 0 additions & 112 deletions ports/ceres/find-package-required.patch

This file was deleted.

14 changes: 9 additions & 5 deletions ports/ceres/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,15 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ceres-solver/ceres-solver
REF f68321e7de8929fbcdb95dd42877531e64f72f66 #2.1.0
SHA512 67bbd8a9385a40fe69d118fbc84da0fcc9aa1fbe14dd52f5403ed09686504213a1d931e95a1a0148d293b27ab5ce7c1d618fbf2e8fed95f2bbafab851a1ef449
REF 85331393dc0dff09f6fb9903ab0c4bfa3e134b01 #2.2.0
SHA512 16d3f4f3524b7532f666c0a626f1c678170698119eff3d914ade2e7cc65f25e644c2eabb618cd5805cba0fd4e08d3f64658a9f480934d8aace4089ec42b3d691
HEAD_REF master
PATCHES
0001_cmakelists_fixes.patch
0002_use_glog_target.patch
0003_fix_exported_ceres_config.patch
find-package-required.patch
)

file(REMOVE "${SOURCE_PATH}/cmake/FindCXSparse.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/FindGflags.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/FindGlog.cmake")
file(REMOVE "${SOURCE_PATH}/cmake/FindEigen.cmake")
Expand All @@ -30,7 +28,6 @@ vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"schur" SCHUR_SPECIALIZATIONS
"suitesparse" SUITESPARSE
"cxsparse" CXSPARSE
"lapack" LAPACK
"eigensparse" EIGENSPARSE
"tools" GFLAGS
Expand All @@ -44,6 +41,11 @@ foreach (FEATURE ${FEATURE_OPTIONS})
message(STATUS "${FEATURE}")
endforeach()

set(USE_CUDA OFF)
if("cuda" IN_LIST FEATURES)
set(USE_CUDA ON)
endif()

set(TARGET_OPTIONS )
if(VCPKG_TARGET_IS_IOS)
# Note: CMake uses "OSX" not just for macOS, but also iOS, watchOS and tvOS.
Expand All @@ -52,6 +54,7 @@ endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
MAYBE_UNUSED_VARIABLES
OPTIONS
${FEATURE_OPTIONS}
${TARGET_OPTIONS}
Expand All @@ -60,6 +63,7 @@ vcpkg_cmake_configure(
-DBUILD_EXAMPLES=OFF
-DBUILD_TESTING=OFF
-DBUILD_BENCHMARKS=OFF
-DUSE_CUDA=${USE_CUDA}
-DPROVIDE_UNINSTALL_TARGET=OFF
-DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE}
-DLIB_SUFFIX=${LIB_SUFFIX}
Expand Down
14 changes: 1 addition & 13 deletions ports/ceres/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "ceres",
"version": "2.1.0",
"port-version": 5,
"version": "2.2.0",
"description": "non-linear optimization package",
"homepage": "https://github.com/ceres-solver/ceres-solver",
"license": "Apache-2.0",
Expand All @@ -28,17 +27,6 @@
"cuda"
]
},
"cxsparse": {
"description": "CXSparse support for Ceres",
"dependencies": [
{
"name": "ceres",
"features": [
"suitesparse"
]
}
]
},
"eigensparse": {
"description": "Use of Eigen as a sparse linear algebra library in Ceres"
},
Expand Down
1 change: 0 additions & 1 deletion ports/openmvg/vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
{
"name": "ceres",
"features": [
"cxsparse",
"suitesparse"
]
},
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -1585,8 +1585,8 @@
"port-version": 1
},
"ceres": {
"baseline": "2.1.0",
"port-version": 5
"baseline": "2.2.0",
"port-version": 0
},
"cfitsio": {
"baseline": "3.49",
Expand Down
5 changes: 5 additions & 0 deletions versions/c-/ceres.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "23a0b71f09485fdd71622b4cb08ffb9504a3e781",
"version": "2.2.0",
"port-version": 0
},
{
"git-tree": "213619bf4451443bd69f784f9a7fa32fc2436e07",
"version": "2.1.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/o-/openmvg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "e08aec4337f9a281817b2c84d04fee5a079551d8",
"git-tree": "ce150540ea4d0c70dbef977eac1c630c532f0ec9",
ahojnnes marked this conversation as resolved.
Show resolved Hide resolved
"version": "2.0",
"port-version": 11
},
Expand Down
Loading