Skip to content

Commit 351ac10

Browse files
authored
Update to latest colmap and use L1 solver + union-find from colmap (#223)
* Update to latest colmap and use L1 solver + union-find from colmap * d * d * d * d * d * d * d * d * d * d * d * d
1 parent 0edb1b8 commit 351ac10

23 files changed

+104
-779
lines changed

.github/workflows/mac.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
matrix:
1818
config: [
1919
{
20-
os: macos-14,
20+
os: macos-15,
2121
arch: arm64,
2222
cmakeBuildType: Release,
2323
},

.github/workflows/ubuntu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
if: matrix.config.checkCodeFormat
101101
run: |
102102
set +x -euo pipefail
103-
python -m pip install clang-format==19.1.0
103+
python -m pip install clang-format==20.1.5
104104
./scripts/format/c++.sh
105105
git diff --name-only
106106
git diff --exit-code || (echo "Code formatting failed" && exit 1)

.github/workflows/windows.yml

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,7 @@ jobs:
1717
matrix:
1818
config: [
1919
{
20-
os: windows-2022,
21-
cmakeBuildType: Release,
22-
cudaEnabled: true,
23-
testsEnabled: true,
24-
exportPackage: true,
25-
},
26-
{
27-
os: windows-2022,
20+
os: windows-2025,
2821
cmakeBuildType: Release,
2922
cudaEnabled: false,
3023
testsEnabled: true,
@@ -37,13 +30,13 @@ jobs:
3730
COMPILER_CACHE_DIR: ${{ github.workspace }}/compiler-cache
3831
CCACHE_DIR: ${{ github.workspace }}/compiler-cache/ccache
3932
CCACHE_BASEDIR: ${{ github.workspace }}
40-
VCPKG_COMMIT_ID: bc3512a509f9d29b37346a7e7e929f9a26e66c7e
33+
VCPKG_COMMIT_ID: 2ad7bd06128280e02bfe02361d8ffd7d465cfcf0
4134
GLOG_v: 1
4235
GLOG_logtostderr: 1
4336

4437
steps:
4538
- uses: actions/checkout@v4
46-
39+
4740
# We define the vcpkg binary sources using separate variables for read and
4841
# write operations:
4942
# * Read sources are defined as inline. These can be read by anyone and,
@@ -74,7 +67,7 @@ jobs:
7467
key: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}-${{ github.run_id }}-${{ github.run_number }}
7568
restore-keys: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}
7669
path: ${{ env.COMPILER_CACHE_DIR }}
77-
70+
7871
- name: Install ccache
7972
shell: pwsh
8073
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/data
33
/.vscode
44
/compile_commands.json
5+
.cache

CMakeLists.txt

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,17 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
2020

2121
set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_NO_CYCLES ON)
2222

23+
# Determine project compiler.
24+
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
25+
set(IS_MSVC TRUE)
26+
endif()
27+
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
28+
set(IS_GNU TRUE)
29+
endif()
30+
if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
31+
set(IS_CLANG TRUE)
32+
endif()
33+
2334
include(cmake/FindDependencies.cmake)
2435

2536
if (TESTS_ENABLED)
@@ -45,8 +56,7 @@ else()
4556
message(STATUS "Disabling ccache support")
4657
endif()
4758

48-
49-
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
59+
if(IS_MSVC)
5060
# Some fixes for the Glog library.
5161
add_definitions("-DGLOG_USE_GLOG_EXPORT")
5262
add_definitions("-DGLOG_NO_ABBREVIATED_SEVERITIES")
@@ -62,4 +72,5 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
6272
endif()
6373
endif()
6474

75+
add_subdirectory(thirdparty)
6576
add_subdirectory(glomap)

cmake/FindDependencies.cmake

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
22

3-
find_package(Eigen3 3.4 REQUIRED)
4-
find_package(CHOLMOD QUIET)
5-
if(NOT TARGET SuiteSparse::CHOLMOD)
6-
find_package(SuiteSparse COMPONENTS CHOLMOD REQUIRED)
7-
endif()
3+
find_package(Eigen3 REQUIRED)
84
find_package(Ceres REQUIRED COMPONENTS SuiteSparse)
95
find_package(Boost REQUIRED)
106
find_package(OpenMP REQUIRED COMPONENTS C CXX)
@@ -24,36 +20,6 @@ if(TESTS_ENABLED)
2420
find_package(GTest REQUIRED)
2521
endif()
2622

27-
include(FetchContent)
28-
FetchContent_Declare(PoseLib
29-
GIT_REPOSITORY https://github.com/PoseLib/PoseLib.git
30-
GIT_TAG 7e9f5f53372e43f89655040d4dfc4a00e5ace11c # 2.0.5
31-
EXCLUDE_FROM_ALL
32-
SYSTEM
33-
)
34-
message(STATUS "Configuring PoseLib...")
35-
if (FETCH_POSELIB)
36-
FetchContent_MakeAvailable(PoseLib)
37-
else()
38-
find_package(PoseLib REQUIRED)
39-
endif()
40-
message(STATUS "Configuring PoseLib... done")
41-
42-
FetchContent_Declare(COLMAP
43-
GIT_REPOSITORY https://github.com/colmap/colmap.git
44-
GIT_TAG c5f9cefc87e5dd596b638e4cee0ff543c7d14755 # Oct 23 2025
45-
EXCLUDE_FROM_ALL
46-
)
47-
message(STATUS "Configuring COLMAP...")
48-
set(UNINSTALL_ENABLED OFF CACHE INTERNAL "")
49-
set(GUI_ENABLED OFF CACHE INTERNAL "")
50-
if (FETCH_COLMAP)
51-
FetchContent_MakeAvailable(COLMAP)
52-
else()
53-
find_package(COLMAP REQUIRED)
54-
endif()
55-
message(STATUS "Configuring COLMAP... done")
56-
5723
set(CUDA_MIN_VERSION "7.0")
5824
if(CUDA_ENABLED)
5925
if(CMAKE_VERSION VERSION_LESS 3.17)

0 commit comments

Comments
 (0)