Skip to content

Commit

Permalink
ignition-math7: Rename CMake project to gz-math7 (#1933)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <louise@openrobotics.org>
  • Loading branch information
chapulina authored Jun 24, 2022
1 parent 70cf454 commit 154d2bb
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Formula/ignition-math7.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
class IgnitionMath7 < Formula
desc "Math API for robotic applications"
homepage "https://ignitionrobotics.org"
homepage "https://gazebosim.org"
url "https://github.com/gazebosim/gz-math.git", branch: "main"
version "6.999.999~0~20220414"
license "Apache-2.0"
Expand All @@ -9,8 +9,8 @@ class IgnitionMath7 < Formula
depends_on "doxygen" => :build
depends_on "pybind11" => :build
depends_on "eigen"
depends_on "ignition-cmake3"
depends_on "ignition-utils2"
depends_on "gz-cmake3"
depends_on "gz-utils2"
depends_on "ruby"

def install
Expand All @@ -23,26 +23,26 @@ def install

test do
(testpath/"test.cpp").write <<-EOS
#include "ignition/math/SignalStats.hh"
#include "gz/math/SignalStats.hh"
int main() {
ignition::math::SignalMean mean;
gz::math::SignalMean mean;
mean.InsertData(1.0);
mean.InsertData(-1.0);
return static_cast<int>(mean.Value());
}
EOS
(testpath/"CMakeLists.txt").write <<-EOS
cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
find_package(ignition-math7 QUIET REQUIRED)
find_package(gz-math7 QUIET REQUIRED)
add_executable(test_cmake test.cpp)
target_link_libraries(test_cmake ignition-math7::ignition-math7)
target_link_libraries(test_cmake gz-math7::gz-math7)
EOS
# test building with manual compiler flags
system ENV.cc, "test.cpp",
"--std=c++14",
"-I#{include}/ignition/math7",
"-I#{include}/gz/math7",
"-L#{lib}",
"-lignition-math7",
"-lgz-math7",
"-lc++",
"-o", "test"
system "./test"
Expand Down

0 comments on commit 154d2bb

Please sign in to comment.