Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
matrix:
config: [
{
os: macos-14,
os: macos-15,
arch: arm64,
cmakeBuildType: Release,
},
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
if: matrix.config.checkCodeFormat
run: |
set +x -euo pipefail
python -m pip install clang-format==19.1.0
python -m pip install clang-format==20.1.5
./scripts/format/c++.sh
git diff --name-only
git diff --exit-code || (echo "Code formatting failed" && exit 1)
Expand Down
15 changes: 4 additions & 11 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,7 @@ jobs:
matrix:
config: [
{
os: windows-2022,
cmakeBuildType: Release,
cudaEnabled: true,
testsEnabled: true,
exportPackage: true,
},
{
os: windows-2022,
os: windows-2025,
cmakeBuildType: Release,
cudaEnabled: false,
testsEnabled: true,
Expand All @@ -37,13 +30,13 @@ jobs:
COMPILER_CACHE_DIR: ${{ github.workspace }}/compiler-cache
CCACHE_DIR: ${{ github.workspace }}/compiler-cache/ccache
CCACHE_BASEDIR: ${{ github.workspace }}
VCPKG_COMMIT_ID: bc3512a509f9d29b37346a7e7e929f9a26e66c7e
VCPKG_COMMIT_ID: 2ad7bd06128280e02bfe02361d8ffd7d465cfcf0
GLOG_v: 1
GLOG_logtostderr: 1

steps:
- uses: actions/checkout@v4

# We define the vcpkg binary sources using separate variables for read and
# write operations:
# * Read sources are defined as inline. These can be read by anyone and,
Expand Down Expand Up @@ -74,7 +67,7 @@ jobs:
key: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}-${{ github.run_id }}-${{ github.run_number }}
restore-keys: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}
path: ${{ env.COMPILER_CACHE_DIR }}

- name: Install ccache
shell: pwsh
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/data
/.vscode
/compile_commands.json
.cache
15 changes: 13 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,17 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_NO_CYCLES ON)

# Determine project compiler.
if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
set(IS_MSVC TRUE)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(IS_GNU TRUE)
endif()
if(CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
set(IS_CLANG TRUE)
endif()

include(cmake/FindDependencies.cmake)

if (TESTS_ENABLED)
Expand All @@ -45,8 +56,7 @@ else()
message(STATUS "Disabling ccache support")
endif()


if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
if(IS_MSVC)
# Some fixes for the Glog library.
add_definitions("-DGLOG_USE_GLOG_EXPORT")
add_definitions("-DGLOG_NO_ABBREVIATED_SEVERITIES")
Expand All @@ -62,4 +72,5 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
endif()
endif()

add_subdirectory(thirdparty)
add_subdirectory(glomap)
36 changes: 1 addition & 35 deletions cmake/FindDependencies.cmake
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

find_package(Eigen3 3.4 REQUIRED)
find_package(CHOLMOD QUIET)
if(NOT TARGET SuiteSparse::CHOLMOD)
find_package(SuiteSparse COMPONENTS CHOLMOD REQUIRED)
endif()
find_package(Eigen3 REQUIRED)
find_package(Ceres REQUIRED COMPONENTS SuiteSparse)
find_package(Boost REQUIRED)
find_package(OpenMP REQUIRED COMPONENTS C CXX)
Expand All @@ -24,36 +20,6 @@ if(TESTS_ENABLED)
find_package(GTest REQUIRED)
endif()

include(FetchContent)
FetchContent_Declare(PoseLib
GIT_REPOSITORY https://github.com/PoseLib/PoseLib.git
GIT_TAG 7e9f5f53372e43f89655040d4dfc4a00e5ace11c # 2.0.5
EXCLUDE_FROM_ALL
SYSTEM
)
message(STATUS "Configuring PoseLib...")
if (FETCH_POSELIB)
FetchContent_MakeAvailable(PoseLib)
else()
find_package(PoseLib REQUIRED)
endif()
message(STATUS "Configuring PoseLib... done")

FetchContent_Declare(COLMAP
GIT_REPOSITORY https://github.com/colmap/colmap.git
GIT_TAG c5f9cefc87e5dd596b638e4cee0ff543c7d14755 # Oct 23 2025
EXCLUDE_FROM_ALL
)
message(STATUS "Configuring COLMAP...")
set(UNINSTALL_ENABLED OFF CACHE INTERNAL "")
set(GUI_ENABLED OFF CACHE INTERNAL "")
if (FETCH_COLMAP)
FetchContent_MakeAvailable(COLMAP)
else()
find_package(COLMAP REQUIRED)
endif()
message(STATUS "Configuring COLMAP... done")

set(CUDA_MIN_VERSION "7.0")
if(CUDA_ENABLED)
if(CMAKE_VERSION VERSION_LESS 3.17)
Expand Down
Loading
Loading