Skip to content

Commit

Permalink
sophus: reintroduce fmt dependency after upstream fix
Browse files Browse the repository at this point in the history
Sophus compilation was broken with libfmt version >= 9.0. As a
workaround the dependency was removed and "basic logging" enabled:
- #108156
- #110137

The sophus formula was recently updated to version 22.10, which fixed
the compatibility with libfmt version >= 9.0:
- strasdat/Sophus#376
- #11286

This PR removes the workaround.

Closes #112988.

Signed-off-by: Carlo Cabrera <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
  • Loading branch information
NikolausDemmel authored and BrewTestBot committed Oct 13, 2022
1 parent aa0f417 commit 97a672b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Formula/sophus.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ class Sophus < Formula
url "https://github.com/strasdat/Sophus/archive/refs/tags/v22.10.tar.gz"
sha256 "270709b83696da179447cf743357e36a8b9bc8eed5ff4b9d66d33fe691010bad"
license "MIT"
revision 1
head "https://github.com/strasdat/Sophus.git", branch: "master"

bottle do
Expand All @@ -13,13 +14,13 @@ class Sophus < Formula
depends_on "cmake" => [:build, :test]
depends_on "ceres-solver"
depends_on "eigen"
depends_on "fmt"

fails_with gcc: "5" # C++17 (ceres-solver dependency)

def install
system "cmake", "-S", ".", "-B", "build", *std_cmake_args,
"-DBUILD_SOPHUS_EXAMPLES=OFF",
"-DSOPHUS_USE_BASIC_LOGGING=ON"
"-DBUILD_SOPHUS_EXAMPLES=OFF"
system "cmake", "--build", "build"
system "cmake", "--install", "build"
(pkgshare/"examples").install "examples/HelloSO3.cpp"
Expand All @@ -30,7 +31,6 @@ def install
(testpath/"CMakeLists.txt").write <<~EOS
cmake_minimum_required(VERSION 3.5)
project(HelloSO3)
add_compile_definitions(SOPHUS_USE_BASIC_LOGGING)
find_package(Sophus REQUIRED)
add_executable(HelloSO3 HelloSO3.cpp)
target_link_libraries(HelloSO3 Sophus::Sophus)
Expand Down

0 comments on commit 97a672b

Please sign in to comment.