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

Update Ceres from 1.14.0 to 2.1.0 #728

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
16 changes: 5 additions & 11 deletions CMake/External_Ceres.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
if (NOT fletch_BUILD_CXX17)
message(FATAL_ERROR "Ceres requires C++17 support, please enable fletch_BUILD_CXX17")
endif()

# Set Eigen dependency
if (fletch_ENABLE_Eigen)
Expand Down Expand Up @@ -34,23 +37,12 @@ if (fletch_ENABLE_GFlags)
)
endif()

set (Ceres_PATCH_DIR ${fletch_SOURCE_DIR}/Patches/Ceres/${Ceres_version})
if (EXISTS ${Ceres_PATCH_DIR})
set (Ceres_PATCH_COMMAND ${CMAKE_COMMAND}
-DCeres_patch=${Ceres_PATCH_DIR}
-DCeres_source=${fletch_BUILD_PREFIX}/src/Ceres
-P ${Ceres_PATCH_DIR}/Patch.cmake)
else()
set (Ceres_PATCH_COMMAND "")
endif()

ExternalProject_Add(Ceres
DEPENDS ${Ceres_DEPENDS}
URL ${Ceres_file}
URL_MD5 ${Ceres_md5}
${COMMON_EP_ARGS}
${COMMON_CMAKE_EP_ARGS}
PATCH_COMMAND ${Ceres_PATCH_COMMAND}
CMAKE_ARGS
${COMMON_CMAKE_ARGS}
-DBUILD_SHARED_LIBS:BOOL=ON
Expand Down Expand Up @@ -85,5 +77,7 @@ else()
set(Ceres_DIR \${fletch_ROOT}/lib/cmake/Ceres)
endif()

find_package(Ceres @Ceres_version@ REQUIRED)

set(fletch_ENABLED_Ceres TRUE)
")
4 changes: 3 additions & 1 deletion CMake/External_OpenCV.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,9 @@ if (CMAKE_COMPILER_IS_GNUCC AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5)
endif()

# OpenCV 3.3.0 has an option to enable C++ 11
if (fletch_BUILD_CXX11)
if(fletch_BUILD_CXX17)
list(APPEND OpenCV_EXTRA_BUILD_FLAGS -DENABLE_CXX14:BOOL=ON)
else()
list(APPEND OpenCV_EXTRA_BUILD_FLAGS -DENABLE_CXX11:BOOL=ON)
endif()

Expand Down
38 changes: 0 additions & 38 deletions CMake/External_libjson.cmake

This file was deleted.

4 changes: 0 additions & 4 deletions CMake/External_pybind11.cmake
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
if (NOT fletch_BUILD_CXX11)
message(FATAL_ERROR "CXX11 must be enabled to use pybind11")
endif()

if (PYTHON_EXECUTABLE)
set(pybind_PYTHON_ARGS -DPYTHON_EXECUTABLE:FILEPATH=${PYTHON_EXECUTABLE})
endif()
Expand Down
21 changes: 6 additions & 15 deletions CMake/fletch-tarballs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,9 @@ set(GFlags_dlname "gflags-${GFlags_version}.tar.gz")
list(APPEND fletch_external_sources GFlags)

# GLog
set(GLog_version "0.3.5")
set(GLog_version "0.6.0")
set(GLog_url "https://github.com/google/glog/archive/v${GLog_version}.tar.gz")
set(GLog_md5 "5df6d78b81e51b90ac0ecd7ed932b0d4")
set(GLog_md5 "c98a6068bc9b8ad9cebaca625ca73aa2")
set(GLog_dlname "glog-${GLog_version}.tar.gz")
list(APPEND fletch_external_sources GLog)

Expand Down Expand Up @@ -192,15 +192,15 @@ if(NOT WIN32)
endif()

#SuiteSparse
set(SuiteSparse_version 4.4.5)
set(SuiteSparse_version 4.5.6)
set(SuiteSparse_url "http://faculty.cse.tamu.edu/davis/SuiteSparse/SuiteSparse-${SuiteSparse_version}.tar.gz")
set(SuiteSparse_md5 "a2926c27f8a5285e4a10265cc68bbc18")
set(SuiteSparse_md5 "eeb87a842a9b3b0425cf08d97fb3c5ec")
list(APPEND fletch_external_sources SuiteSparse)

# Ceres Solver
set(Ceres_version 1.14.0)
set(Ceres_version 2.1.0)
set(Ceres_url "http://ceres-solver.org/ceres-solver-${Ceres_version}.tar.gz")
set(Ceres_md5 "fd9b4eba8850f0f2ede416cd821aafa5")
set(Ceres_md5 "b75911efa91f7f1c03345fe8504be48e")
set(Ceres_dlname "ceres-solver-${Ceres_version}.tar.gz")
list(APPEND fletch_external_sources Ceres)

Expand All @@ -220,15 +220,6 @@ if(WIN32)
set(jom_md5 "a021066aefcea8999b382b1c7c12165e")
endif()

# libjson
set(libjson_version_major 7)
set(libjson_version_minor 6)
set(libjson_version_patch 1)
set(libjson_version "${libjson_version_major}.${libjson_version_minor}.${libjson_version_patch}")
set(libjson_url "http://sourceforge.net/projects/libjson/files/libjson_${libjson_version}.zip")
set(libjson_md5 "82f3fcbf9f8cf3c4e25e1bdd77d65164")
list(APPEND fletch_external_sources libjson)

# shapelib
set(shapelib_version 1.4.1)
set(shapelib_url "http://download.osgeo.org/shapelib/shapelib-${shapelib_version}.tar.gz")
Expand Down
12 changes: 6 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.3.0)
cmake_minimum_required(VERSION 3.10.0)
project(fletch)

# Policy to address @foo@ variable expansion
Expand Down Expand Up @@ -75,11 +75,11 @@ include(${fletch_CMAKE_DIR}/Utils.cmake)
add_custom_target(Download)
add_custom_target(fletch-build-install)

# Include CXX11 support
set(fletch_CXX_STANDARD_VERSION "98")
option(fletch_BUILD_CXX11 "" TRUE)
if (fletch_BUILD_CXX11)
set(fletch_CXX_STANDARD_VERSION "11")
set(fletch_CXX_STANDARD_VERSION "11")
# Include CXX17 support
option(fletch_BUILD_CXX17 "Enable C++17 standard" TRUE)
if (fletch_BUILD_CXX17)
set(fletch_CXX_STANDARD_VERSION "17")
endif()

#
Expand Down
7 changes: 7 additions & 0 deletions Doc/release-notes/master.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,10 @@ Updates since v1.5.0
* Update GDAL from 2.3.2 to 2.4.4
* Added option to get OpenCV source for version 4.5.1 from PyPI
* Added option to use VTK 9.1.0 and made 9.1 the default
* Added option to enable C++17 which is on by default
* Change fallback C++ standard to C++11 from C++98
* Update CMake minumum required version to 3.10
* Update Ceres from 1.14.0 to 2.1.0
* Update GLog from 0.3.5 to 0.6.0
* Update SuiteSparse from 4.4.5 to 4.5.6
* Remove libjson from Fletch
Loading