diff --git a/.github/workflows/pybind.yml b/.github/workflows/pybind.yml index 42f15068..32fca984 100644 --- a/.github/workflows/pybind.yml +++ b/.github/workflows/pybind.yml @@ -12,7 +12,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-20.04, macos-13] + os: [ubuntu-22.04, macos-13] fail-fast: false steps: @@ -33,7 +33,7 @@ jobs: sudo apt install -y libunwind-dev # Generic dependencies - sudo apt-get install cmake + sudo apt-get install cmake libeigen3-dev libfmt-dev # Clean APT cache sudo apt-get clean @@ -42,7 +42,7 @@ jobs: # Install system deps with Homebrew brew install cmake # VRS dependencies - brew install fmt lz4 zstd xxhash + brew install eigen fmt lz4 zstd xxhash else echo "$RUNNER_OS not supported" exit 1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 9dfc48f8..3a7dae44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,13 +30,13 @@ 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 -Wno-deprecated-register -Qunused-arguments -fcolor-diagnostics" + "${CMAKE_CXX_FLAGS} -Wall -Wno-error -Wextra -Wno-deprecated-register -Qunused-arguments -fcolor-diagnostics" ) elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") 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 -Wno-array-bounds" + "${CMAKE_CXX_FLAGS} -Wall -Wno-error -Wextra -std=c++14 -Wno-deprecated-declarations -ftemplate-backtrace-limit=0 -Wno-array-bounds" ) endif() @@ -111,6 +111,9 @@ endif() # Build python sophus bindings option(BUILD_PYTHON_BINDINGS "Build python sophus bindings." OFF) if(BUILD_PYTHON_BINDINGS) + if(NOT TARGET fmt::fmt) + find_package(fmt REQUIRED) + endif() include(FetchContent) FetchContent_Declare( pybind11 @@ -121,7 +124,7 @@ if(BUILD_PYTHON_BINDINGS) add_subdirectory(${pybind11_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/pybind) pybind11_add_module(sophus_pybind ${CMAKE_CURRENT_SOURCE_DIR}/sophus_pybind/bindings.cpp) - target_link_libraries(sophus_pybind PUBLIC sophus) + target_link_libraries(sophus_pybind PUBLIC sophus fmt::fmt) endif(BUILD_PYTHON_BINDINGS) if(SOPHUS_INSTALL) diff --git a/setup.py b/setup.py index 05bf4db8..d030bee4 100644 --- a/setup.py +++ b/setup.py @@ -43,7 +43,6 @@ def build_extension(self, ext): cmake_args = [ "-DBUILD_PYTHON_BINDINGS=ON", - "-DBUILD_SOPHUS_EXAMPLES=OFF", "-DBUILD_SOPHUS_TESTS=OFF", ] build_args = [] diff --git a/sophus/average.hpp b/sophus/average.hpp index 8bbe5571..f10558a0 100644 --- a/sophus/average.hpp +++ b/sophus/average.hpp @@ -5,6 +5,8 @@ #include +#include + #include "cartesian.hpp" #include "common.hpp" #include "rxso2.hpp"