Skip to content

Commit

Permalink
maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
strasdat committed Jun 9, 2024
1 parent d270df2 commit f588a62
Show file tree
Hide file tree
Showing 48 changed files with 277 additions and 851 deletions.
59 changes: 0 additions & 59 deletions .github/workflows/coverage.yml

This file was deleted.

34 changes: 0 additions & 34 deletions .github/workflows/gh_pages.yml

This file was deleted.

52 changes: 22 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,51 +12,43 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
build_type: [Debug, Release]
row_major: [ON, OFF]
basic_logging: [ON, OFF]
exclude:
- build_type: Release
include:
- os: ubuntu-22.04
build_type: Release
row_major: ON
- build_type: Release
basic_logging: ON
- build_type: Debug
row_major: ON
basic_logging: ON
- os: ubuntu-22.04
build_type: RelWithDebInfo
row_major: OFF
- os: ubuntu-24.04
build_type: RelWithDebInfo
row_major: OFF
- os: macos-13
build_type: RelWithDebInfo
row_major: OFF
- os: macos-14
build_type: RelWithDebInfo
row_major: OFF
fail-fast: false
env:
BUILD_TYPE: ${{ matrix.build_type }}
ROW_MAJOR_DEFAULT: ${{ matrix.row_major }}
USE_BASIC_LOGGING: ${{ matrix.basic_logging }}


steps:
- uses: actions/checkout@v2

- name: Format
uses: DoozyX/[email protected]
with:
source: '.'
extensions: 'hpp,cpp'
exclude: './sympy ./doxyrest_b'
clangFormatVersion: 9
if: matrix.os == 'ubuntu-20.04'

- name: ccache
uses: hendrikmuhs/ccache-action@v1

- name: Install dependencies (Linux)
run: ./scripts/install_linux_deps.sh
if: matrix.os == 'ubuntu-20.04'
- name: Install dependencies (Linux incl. Ceres)
run: ./scripts/install_ubuntu22.04_deps.sh
if: matrix.os == 'ubuntu-22.04'

- name: Install fmt dependency (Linux)
run: ./scripts/install_linux_fmt_deps.sh
if: matrix.os == 'ubuntu-20.04' && matrix.basic_logging == 'OFF'
- name: Install dependencies (Linux NO Ceres)
run: ./scripts/install_ubuntu24.04_deps.sh
if: matrix.os == 'ubuntu-24.04'

- name: Install dependencies (Mac OS)
run: ./scripts/install_osx_deps.sh
if: matrix.os == 'macos-10.15'
if: matrix.os == 'macos-14' || matrix.os == 'macos-13'

- name: Run tests
run: ./scripts/run_cpp_tests.sh
29 changes: 7 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.4)
project(Sophus VERSION 1.22.10)
cmake_minimum_required(VERSION 3.16)
project(Sophus VERSION 1.24.06)

include(CMakePackageConfigHelpers)
include(GNUInstallDirs)
Expand All @@ -15,7 +15,6 @@ if (NOT DEFINED SOPHUS_MASTER_PROJECT)
endif ()

option(SOPHUS_INSTALL "Generate the install target." ${SOPHUS_MASTER_PROJECT})
option(SOPHUS_USE_BASIC_LOGGING "Use basic logging (in ensure and test macros)" OFF)

if(SOPHUS_MASTER_PROJECT)
# Release by default
Expand All @@ -24,7 +23,7 @@ if(SOPHUS_MASTER_PROJECT)
set(CMAKE_BUILD_TYPE Release)
endif()

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD 17)

# Set compiler specific settings (FixMe: Should not cmake do this for us automatically?)
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
Expand All @@ -35,9 +34,6 @@ if(SOPHUS_MASTER_PROJECT)
SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
SET(CMAKE_CXX_FLAGS_RELEASE "-O3")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Werror -Wextra -std=c++14 -Wno-deprecated-declarations -ftemplate-backtrace-limit=0")
SET(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG} --coverage -fno-inline -fno-inline-small-functions -fno-default-inline")
SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE "${CMAKE_EXE_LINKER_FLAGS_DEBUG} --coverage")
SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} --coverage")
ELSEIF(CMAKE_CXX_COMPILER_ID MATCHES "^MSVC$")
ADD_DEFINITIONS("-D _USE_MATH_DEFINES /bigobj /wd4305 /wd4244 /MP")
ENDIF()
Expand All @@ -46,10 +42,6 @@ if(SOPHUS_MASTER_PROJECT)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules")
endif()

if(SOPHUS_USE_BASIC_LOGGING)
set (CMAKE_DISABLE_FIND_PACKAGE_fmt ON)
endif()

# Find public dependencies if targets are not yet defined. (Targets might be for example
# defined by a parent project including Sophus via `add_subdirectory`.)

Expand Down Expand Up @@ -89,7 +81,6 @@ set(SOPHUS_HEADER_FILES
sophus/so3.hpp
sophus/spline.hpp
sophus/types.hpp
sophus/velocities.hpp
)

set(SOPHUS_OTHER_FILES
Expand All @@ -110,16 +101,10 @@ else()
target_include_directories (sophus SYSTEM INTERFACE ${EIGEN3_INCLUDE_DIR})
endif()

if(SOPHUS_USE_BASIC_LOGGING OR NOT TARGET fmt::fmt)
# NOTE fmt_FOUND does not seem to be defined even though the package config
# was found.
target_compile_definitions(sophus INTERFACE SOPHUS_USE_BASIC_LOGGING=1)
message(STATUS "Turning basic logging ON")
else()
target_link_libraries(sophus INTERFACE fmt::fmt)
set(fmt_DEPENDENCY "find_dependency (fmt ${fmt_VERSION})")
message(STATUS "Turning basic logging OFF")
endif()

target_link_libraries(sophus INTERFACE fmt::fmt)
set(fmt_DEPENDENCY "find_dependency (fmt ${fmt_VERSION})")
message(STATUS "Turning basic logging OFF")

# Associate target with include directory
target_include_directories(sophus INTERFACE
Expand Down
24 changes: 13 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,23 @@ The specific compiler and operating system versions which are supported are
the ones which are used in the Continuous Integration (CI): See GitHubCI_ and
AppVeyor_ for details.

However, it should work (with no to minor modification) on many other
modern configurations as long they support c++14, CMake, Eigen 3.3.X and
(optionally) fmt. The fmt dependency can be eliminated by passing
"-DUSE_BASIC_LOGGING=ON" to cmake when configuring Sophus.

.. _GitHubCI: https://github.com/strasdat/Sophus/actions

.. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/um4285lwhs8ci7pt/branch/master?svg=true
.. _AppVeyor: https://ci.appveyor.com/project/strasdat/sophus/branch/master

.. |ci_cov| image:: https://coveralls.io/repos/github/strasdat/Sophus/badge.svg?branch=master
.. _ci_cov: https://coveralls.io/github/strasdat/Sophus?branch=master

.. |GithubCICpp| image:: https://github.com/strasdat/Sophus/actions/workflows/main.yml/badge.svg?branch=master
.. _GithubCICpp: https://github.com/strasdat/Sophus/actions/workflows/main.yml?query=branch%3Amaster

.. |GithubCISympy| image:: https://github.com/strasdat/Sophus/actions/workflows/sympy.yml/badge.svg?branch=master
.. _GithubCISympy: https://github.com/strasdat/Sophus/actions/workflows/sympy.yml?query=branch%3Amaster


Install Ubuntu 22.04
--------------------

sudo apt install libeigen3-dev
sudo apt install libfmt-dev
sudo apt install libceres-dev

mkdir build
cd build
cmake ..
make -j4
64 changes: 63 additions & 1 deletion Sophus.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,67 @@
"path": "."
}
],
"settings": {}
"settings": {
"files.associations": {
"type_traits": "cpp",
"array": "cpp",
"optional": "cpp",
"atomic": "cpp",
"bit": "cpp",
"*.tcc": "cpp",
"cctype": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"compare": "cpp",
"complex": "cpp",
"concepts": "cpp",
"cstdarg": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
"cstdlib": "cpp",
"cstring": "cpp",
"ctime": "cpp",
"cwchar": "cpp",
"cwctype": "cpp",
"deque": "cpp",
"list": "cpp",
"map": "cpp",
"set": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"unordered_set": "cpp",
"vector": "cpp",
"exception": "cpp",
"algorithm": "cpp",
"functional": "cpp",
"iterator": "cpp",
"memory": "cpp",
"memory_resource": "cpp",
"numeric": "cpp",
"random": "cpp",
"ratio": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"tuple": "cpp",
"utility": "cpp",
"initializer_list": "cpp",
"iosfwd": "cpp",
"iostream": "cpp",
"istream": "cpp",
"limits": "cpp",
"new": "cpp",
"numbers": "cpp",
"ostream": "cpp",
"semaphore": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"stop_token": "cpp",
"streambuf": "cpp",
"thread": "cpp",
"cinttypes": "cpp",
"typeinfo": "cpp"
}
}
}
35 changes: 0 additions & 35 deletions appveyor.yml

This file was deleted.

Loading

0 comments on commit f588a62

Please sign in to comment.