Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ignition-math7: Rename CMake project to gz-math7 #1933

Merged
merged 3 commits into from
Jun 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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