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:
- Homebrew#108156
- Homebrew#110137

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

This PR removes the workaround.
  • Loading branch information
NikolausDemmel committed Oct 12, 2022
1 parent 24b819c commit 753f20e
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 753f20e

Please sign in to comment.