From 54add6c316c2b2c1a52584dbf4e187f167896a00 Mon Sep 17 00:00:00 2001 From: Michael Carroll Date: Mon, 30 Sep 2024 22:27:03 +0000 Subject: [PATCH] Update for rules_gazebo Signed-off-by: Michael Carroll --- .bazelversion | 2 +- BUILD.bazel | 1209 ++++++++++++++++++++++++++++++++++-- MODULE.bazel | 6 +- eigen3/BUILD.bazel | 40 -- include/gz/math/Matrix3.hh | 3 +- 5 files changed, 1156 insertions(+), 104 deletions(-) diff --git a/.bazelversion b/.bazelversion index 66ce77b7..643916c0 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -7.0.0 +7.3.1 diff --git a/BUILD.bazel b/BUILD.bazel index 657c18be..c7300730 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -1,6 +1,6 @@ -load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test") -load("@rules_gz//gz:headers.bzl", "gz_configure_header", "gz_export_header", "gz_include_header") +load("@rules_gazebo//gazebo:headers.bzl", "gz_configure_header", "gz_export_header") load("@rules_license//rules:license.bzl", "license") +load("@buildifier_prebuilt//:rules.bzl", "buildifier", "buildifier_test") package( default_applicable_licenses = [":license"], @@ -18,90 +18,1183 @@ exports_files([ "MODULE.bazel", ]) +gz_export_header( + name = "Export", + out = "include/gz/math/Export.hh", + export_base = "GZ_MATH", + lib_name = "gz-math", +) + gz_configure_header( name = "config", src = "include/gz/math/config.hh.in", - cmakelists = ["CMakeLists.txt"], - package = "math", + package_xml = "package.xml", ) -gz_export_header( - name = "include/gz/math/Export.hh", - export_base = "GZ_MATH", - lib_name = "gz-math", - visibility = ["//visibility:private"], +cc_library( + name = "AdditivelySeparableScalarField3", + hdrs = ["include/gz/math/AdditivelySeparableScalarField3.hh"], + includes = ["include"], + deps = [ + ":Region3", + ], ) -public_headers_no_gen = glob([ - "include/gz/math/*.hh", - "include/gz/math/detail/*.hh", - "include/gz/math/graph/*.hh", -]) +cc_test( + name = "AdditivelySeparableScalarField3_TEST", + srcs = ["src/AdditivelySeparableScalarField3_TEST.cc"], + deps = [ + ":AdditivelySeparableScalarField3", + ":Polynomial3", + "@googletest//:gtest_main", + ], +) -private_headers = glob(["src/*.hh"]) +cc_library( + name = "Angle", + srcs = ["src/Angle.cc"], + hdrs = ["include/gz/math/Angle.hh"], + includes = ["include"], + deps = [":Helpers"], +) -sources = glob( - ["src/*.cc"], - exclude = ["src/*_TEST.cc"], +cc_test( + name = "Angle_TEST", + srcs = ["src/Angle_TEST.cc"], + deps = [ + ":Angle", + "@googletest//:gtest_main", + ], ) -gz_include_header( - name = "math_hh_genrule", - out = "include/gz/math.hh", - hdrs = public_headers_no_gen + [ - "include/gz/math/Export.hh", - "include/gz/math/config.hh", +cc_library( + name = "AxisAlignedBox", + srcs = ["src/AxisAlignedBox.cc"], + hdrs = ["include/gz/math/AxisAlignedBox.hh"], + includes = ["include"], + deps = [ + ":Helpers", + ":Line3", + ":MassMatrix3", + ":config", ], ) -public_headers = public_headers_no_gen + [ - "include/gz/math/config.hh", - "include/gz/math/Export.hh", - "include/gz/math.hh", -] +cc_test( + name = "AxisAlignedBox_TEST", + srcs = ["src/AxisAlignedBox_TEST.cc"], + deps = [ + ":AxisAlignedBox", + "@googletest//:gtest_main", + ], +) cc_library( - name = "gz-math", - srcs = sources + private_headers, - hdrs = public_headers, - copts = ["-fexceptions"], + name = "Box", + hdrs = [ + "include/gz/math/Box.hh", + "include/gz/math/detail/Box.hh", + "include/gz/math/detail/WellOrderedVector.hh", + ], includes = ["include"], - visibility = ["//visibility:public"], deps = [ - "@gz-utils", + ":Line2", + ":MassMatrix3", + ":Plane", + ":Triangle3", + ":config", + ], +) + +cc_test( + name = "Box_TEST", + srcs = ["src/Box_TEST.cc"], + deps = [ + ":Box", + "@googletest//:gtest_main", ], ) -# Tests -test_sources = glob( - [ - "src/*_TEST.cc", - "src/graph/*_TEST.cc", +cc_library( + name = "Capsule", + hdrs = [ + "include/gz/math/Capsule.hh", + "include/gz/math/detail/Capsule.hh", + ], + includes = ["include"], + deps = [ + ":Inertial", + ":MassMatrix3", ], ) -[cc_test( - name = src.replace("/", "_").replace(".cc", "").replace("src_", ""), - srcs = [src], +cc_test( + name = "Capsule_TEST", + srcs = ["src/Capsule_TEST.cc"], deps = [ - ":gz-math", + ":Capsule", "@googletest//:gtest_main", ], -) for src in test_sources] +) -# Bazel linting -buildifier( - name = "buildifier.fix", - exclude_patterns = ["./.git/*"], - lint_mode = "fix", - mode = "fix", +cc_library( + name = "Color", + srcs = ["src/Color.cc"], + hdrs = [ + "include/gz/math/Color.hh", + ], + includes = ["include"], + deps = [ + ":Helpers", + ":Vector3", + ], ) -buildifier_test( - name = "buildifier.test", - exclude_patterns = ["./.git/*"], - lint_mode = "warn", - mode = "diff", - no_sandbox = True, - workspace = "//:MODULE.bazel", +cc_test( + name = "Color_TEST", + srcs = ["src/Color_TEST.cc"], + deps = [ + ":Color", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Cone", + hdrs = [ + "include/gz/math/Cone.hh", + "include/gz/math/detail/Cone.hh", + ], + includes = ["include"], + deps = [ + ":MassMatrix3", + ], +) + +cc_test( + name = "Cone_TEST", + srcs = ["src/Cone_TEST.cc"], + deps = [ + ":Cone", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "CoordinateVector3", + srcs = ["src/CoordinateVector3.cc"], + hdrs = ["include/gz/math/CoordinateVector3.hh"], + includes = ["include"], + deps = [ + ":Angle", + ":Vector3", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "CoordinateVector3_TEST", + srcs = ["src/CoordinateVector3_TEST.cc"], + deps = [ + ":CoordinateVector3", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Cylinder", + hdrs = [ + "include/gz/math/Cylinder.hh", + "include/gz/math/detail/Cylinder.hh", + ], + includes = ["include"], + deps = [ + ":MassMatrix3", + ], +) + +cc_test( + name = "Cylinder_TEST", + srcs = ["src/Cylinder_TEST.cc"], + deps = [ + ":Cylinder", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "DiffDriveOdometry", + srcs = ["src/DiffDriveOdometry.cc"], + hdrs = [ + "include/gz/math/DiffDriveOdometry.hh", + ], + includes = ["include"], + deps = [ + ":Angle", + ":RollingMean", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "DiffDriveOdometry_TEST", + srcs = ["src/DiffDriveOdometry_TEST.cc"], + deps = [ + ":DiffDriveOdometry", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Ellipsoid", + hdrs = [ + "include/gz/math/Ellipsoid.hh", + "include/gz/math/detail/Ellipsoid.hh", + ], + includes = ["include"], + deps = [ + ":Inertial", + ":MassMatrix3", + ], +) + +cc_test( + name = "Ellipsoid_TEST", + srcs = ["src/Ellipsoid_TEST.cc"], + deps = [ + ":Ellipsoid", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Filter", + hdrs = ["include/gz/math/Filter.hh"], + includes = ["include"], + deps = [ + ":Helpers", + ":Quaternion", + ":Vector3", + ], +) + +cc_test( + name = "Filter_TEST", + srcs = ["src/Filter_TEST.cc"], + deps = [ + ":Filter", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Frustum", + srcs = ["src/Frustum.cc"], + hdrs = ["include/gz/math/Frustum.hh"], + includes = ["include"], + deps = [ + ":Angle", + ":AxisAlignedBox", + ":Matrix4", + ":Plane", + ":Pose3", + ], +) + +cc_test( + name = "Frustum_TEST", + srcs = ["src/Frustum_TEST.cc"], + deps = [ + ":Frustum", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "GaussMarkovProcess", + srcs = ["src/GaussMarkovProcess.cc"], + hdrs = ["include/gz/math/GaussMarkovProcess.hh"], + includes = ["include"], + deps = [ + ":Export", + ":Rand", + ":config", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "GaussMarkovProcess_TEST", + srcs = ["src/GaussMarkovProcess_TEST.cc"], + deps = [ + ":GaussMarkovProcess", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Helpers", + srcs = ["src/Helpers.cc"], + hdrs = ["include/gz/math/Helpers.hh"], + includes = ["include"], + deps = [ + ":Export", + ":config", + "@gz-utils//:NeverDestroyed", + ], +) + +cc_test( + name = "Helpers_TEST", + srcs = ["src/Helpers_TEST.cc"], + deps = [ + ":Helpers", + ":Rand", + ":Vector3", + "@googletest//:gtest_main", + "@gz-utils//:SuppressWarning", + ], +) + +cc_library( + name = "Inertial", + hdrs = ["include/gz/math/Inertial.hh"], + includes = ["include"], + deps = [ + ":MassMatrix3", + ":Matrix6", + ":Pose3", + ":config", + ], +) + +cc_test( + name = "Inertial_TEST", + srcs = ["src/Inertial_TEST.cc"], + deps = [ + ":Inertial", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "InterpolationPoint", + hdrs = [ + "include/gz/math/detail/AxisIndex.hh", + "include/gz/math/detail/InterpolationPoint.hh", + ], + includes = ["include"], + deps = [ + ":Vector2", + ":Vector3", + ], +) + +cc_test( + name = "InterpolationPoint_TEST", + srcs = ["src/InterpolationPoint_TEST.cc"], + deps = [ + ":InterpolationPoint", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Interval", + hdrs = ["include/gz/math/Interval.hh"], + includes = ["include"], + deps = [ + ":config", + ], +) + +cc_test( + name = "Interval_TEST", + srcs = ["src/Interval_TEST.cc"], + deps = [ + ":Interval", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Kmeans", + srcs = [ + "src/Kmeans.cc", + "src/KmeansPrivate.hh", + ], + hdrs = ["include/gz/math/Kmeans.hh"], + includes = ["include"], + deps = [ + ":Rand", + ":Vector3", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "Kmeans_TEST", + srcs = ["src/Kmeans_TEST.cc"], + deps = [ + ":Kmeans", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Line2", + hdrs = ["include/gz/math/Line2.hh"], + includes = ["include"], + deps = [ + ":Vector2", + ], +) + +cc_test( + name = "Line2_TEST", + srcs = ["src/Line2_TEST.cc"], + deps = [ + ":Line2", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Line3", + hdrs = ["include/gz/math/Line3.hh"], + includes = ["include"], + deps = [ + ":Vector3", + ], +) + +cc_test( + name = "Line3_TEST", + srcs = ["src/Line3_TEST.cc"], + deps = [ + ":Line3", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "MassMatrix3", + hdrs = ["include/gz/math/MassMatrix3.hh"], + includes = ["include"], + deps = [ + ":Material", + ":Quaternion", + ":Vector2", + ], +) + +cc_test( + name = "MassMatrix3_TEST", + srcs = ["src/MassMatrix3_TEST.cc"], + deps = [ + ":MassMatrix3", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "MaterialType", + hdrs = ["include/gz/math/MaterialType.hh"], + includes = ["include"], +) + +cc_library( + name = "Material", + srcs = [ + "src/Material.cc", + "src/MaterialType.hh", + ], + hdrs = ["include/gz/math/Material.hh"], + includes = ["include"], + deps = [ + ":Export", + ":Helpers", + ":MaterialType", + ":config", + "@gz-utils//:ImplPtr", + ], ) + +cc_library( + name = "Matrix3", + hdrs = ["include/gz/math/Matrix3.hh"], + includes = ["include"], + deps = [ + ":Vector3", + ], +) + +cc_test( + name = "Matrix3_TEST", + srcs = ["src/Matrix3_TEST.cc"], + deps = [ + ":Helpers", + ":Matrix3", + ":Quaternion", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Matrix4", + hdrs = ["include/gz/math/Matrix4.hh"], + includes = ["include"], + deps = [ + ":Matrix3", + ":Pose3", + ":Quaternion", + ":Vector3", + ], +) + +cc_test( + name = "Matrix4_TEST", + srcs = ["src/Matrix4_TEST.cc"], + deps = [ + ":Matrix4", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Matrix6", + hdrs = ["include/gz/math/Matrix6.hh"], + includes = ["include"], + deps = [ + ":Matrix3", + ":Vector3", + ], +) + +cc_test( + name = "Matrix6_TEST", + srcs = ["src/Matrix6_TEST.cc"], + deps = [ + ":Helpers", + ":Matrix6", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "MecanumDriveOdometry", + srcs = ["src/MecanumDriveOdometry.cc"], + hdrs = ["include/gz/math/MecanumDriveOdometry.hh"], + includes = ["include"], + deps = [ + ":Angle", + ":RollingMean", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "MecanumDriveOdometry_TEST", + srcs = ["src/MecanumDriveOdometry_TEST.cc"], + deps = [ + ":MecanumDriveOdometry", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "MovingWindowFilter", + hdrs = ["include/gz/math/MovingWindowFilter.hh"], + includes = ["include"], + deps = [ + "@gz-utils//:SuppressWarning", + ], +) + +cc_test( + name = "MovingWindowFilter_TEST", + srcs = ["src/MovingWindowFilter_TEST.cc"], + deps = [ + ":MovingWindowFilter", + ":Vector3", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "OrientedBox", + hdrs = ["include/gz/math/OrientedBox.hh"], + includes = ["include"], + deps = [ + ":MassMatrix3", + ":Matrix4", + ], +) + +cc_test( + name = "OrientedBox_TEST", + srcs = ["src/OrientedBox_TEST.cc"], + deps = [ + ":Angle", + ":OrientedBox", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "PID", + srcs = ["src/PID.cc"], + hdrs = ["include/gz/math/PID.hh"], + includes = ["include"], + deps = [ + ":Helpers", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "PID_TEST", + srcs = ["src/PID_TEST.cc"], + deps = [ + ":Angle", + ":PID", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "PiecewiseScalarField3", + hdrs = ["include/gz/math/PiecewiseScalarField3.hh"], + includes = ["include"], +) + +cc_test( + name = "PiecewiseScalarField3_TEST", + srcs = ["src/PiecewiseScalarField3_TEST.cc"], + deps = [ + ":AdditivelySeparableScalarField3", + ":PiecewiseScalarField3", + ":Polynomial3", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Plane", + hdrs = ["include/gz/math/Plane.hh"], + includes = ["include"], + deps = [ + ":AxisAlignedBox", + ":Line2", + ], +) + +cc_test( + name = "Plane_TEST", + srcs = ["src/Plane_TEST.cc"], + deps = [ + ":Helpers", + ":Plane", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Polynomial3", + hdrs = ["include/gz/math/Polynomial3.hh"], + includes = ["include"], + deps = [ + ":Interval", + ":Vector4", + ], +) + +cc_test( + name = "Polynomial3_TEST", + srcs = ["src/Polynomial3_TEST.cc"], + deps = [ + ":Polynomial3", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Pose3", + hdrs = ["include/gz/math/Pose3.hh"], + includes = ["include"], + deps = [":Quaternion"], +) + +cc_test( + name = "Pose_TEST", + srcs = ["src/Pose_TEST.cc"], + deps = [ + ":Helpers", + ":Pose3", + "@googletest//:gtest_main", + "@gz-utils//:SuppressWarning", + ], +) + +cc_library( + name = "Quaternion", + hdrs = ["include/gz/math/Quaternion.hh"], + includes = ["include"], + deps = [ + ":Angle", + ":Matrix3", + ":Vector3", + ], +) + +cc_test( + name = "Quaternion_TEST", + srcs = ["src/Quaternion_TEST.cc"], + deps = [ + ":Helpers", + ":Matrix4", + ":Quaternion", + "@googletest//:gtest_main", + "@gz-utils//:SuppressWarning", + ], +) + +cc_library( + name = "Rand", + srcs = ["src/Rand.cc"], + hdrs = ["include/gz/math/Rand.hh"], + includes = ["include"], + deps = [":Helpers"], +) + +cc_test( + name = "Rand_TEST", + srcs = ["src/Rand_TEST.cc"], + deps = [ + ":Rand", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Region3", + hdrs = ["include/gz/math/Region3.hh"], + includes = ["include"], + deps = [ + ":Interval", + ":Vector3", + ], +) + +cc_test( + name = "Region3_TEST", + srcs = ["src/Region3_TEST.cc"], + deps = [ + ":Region3", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "RollingMean", + srcs = ["src/RollingMean.cc"], + hdrs = ["include/gz/math/RollingMean.hh"], + includes = ["include"], + deps = [ + ":Export", + ":config", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "RollingMean_TEST", + srcs = ["src/RollingMean_TEST.cc"], + deps = [ + ":Helpers", + ":RollingMean", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "RotationSpline", + srcs = ["src/RotationSpline.cc"], + hdrs = ["include/gz/math/RotationSpline.hh"], + includes = ["include"], + deps = [ + ":Quaternion", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "RotationSpline_TEST", + srcs = ["src/RotationSpline_TEST.cc"], + deps = [ + ":RotationSpline", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "SemanticVersion", + srcs = ["src/SemanticVersion.cc"], + hdrs = ["include/gz/math/SemanticVersion.hh"], + includes = ["include"], + deps = [ + ":Helpers", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "SemanticVersion_TEST", + srcs = ["src/SemanticVersion_TEST.cc"], + deps = [ + ":SemanticVersion", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "SignalStats", + srcs = ["src/SignalStats.cc"], + hdrs = ["include/gz/math/SignalStats.hh"], + includes = ["include"], + deps = [ + ":Helpers", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "SignalStats_TEST", + srcs = ["src/SignalStats_TEST.cc"], + deps = [ + ":Rand", + ":SignalStats", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "SpeedLimiter", + srcs = ["src/SpeedLimiter.cc"], + hdrs = ["include/gz/math/SpeedLimiter.hh"], + includes = ["include"], + deps = [ + ":Helpers", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "SpeedLimiter_TEST", + srcs = ["src/SpeedLimiter_TEST.cc"], + deps = [ + ":SpeedLimiter", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Sphere", + hdrs = [ + "include/gz/math/Sphere.hh", + "include/gz/math/detail/Sphere.hh", + ], + includes = ["include"], + deps = [ + ":MassMatrix3", + ":Plane", + ], +) + +cc_test( + name = "Sphere_TEST", + srcs = ["src/Sphere_TEST.cc"], + deps = [ + ":Sphere", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "SphericalCoordinates", + srcs = ["src/SphericalCoordinates.cc"], + hdrs = ["include/gz/math/SphericalCoordinates.hh"], + includes = ["include"], + deps = [ + ":Angle", + ":CoordinateVector3", + ":Helpers", + ":Matrix3", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "SphericalCoordinates_TEST", + srcs = ["src/SphericalCoordinates_TEST.cc"], + deps = [ + ":SphericalCoordinates", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Spline", + srcs = [ + "src/Spline.cc", + "src/SplinePrivate.cc", + "src/SplinePrivate.hh", + ], + hdrs = ["include/gz/math/Spline.hh"], + includes = ["include"], + deps = [ + ":Matrix4", + ":Vector4", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "Spline_TEST", + srcs = ["src/Spline_TEST.cc"], + deps = [ + ":Spline", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Stopwatch", + srcs = [ + "src/Stopwatch.cc", + ], + hdrs = ["include/gz/math/Stopwatch.hh"], + includes = ["include"], + deps = [ + ":Export", + ":config", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "Stopwatch_TEST", + srcs = ["src/Stopwatch_TEST.cc"], + deps = [ + ":Stopwatch", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Temperature", + srcs = [ + "src/Temperature.cc", + ], + hdrs = ["include/gz/math/Temperature.hh"], + includes = ["include"], + deps = [ + ":Export", + ":Helpers", + ":config", + "@gz-utils//:ImplPtr", + ], +) + +cc_test( + name = "Temperature_TEST", + srcs = ["src/Temperature_TEST.cc"], + deps = [ + ":Temperature", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "TimeVaryingVolumetricGrid", + hdrs = ["include/gz/math/TimeVaryingVolumetricGrid.hh"], + includes = ["include"], + deps = [ + ":TimeVaryingVolumetricGridLookupField", + ], +) + +cc_test( + name = "TimeVaryingVolumetricGrid_TEST", + srcs = ["src/TimeVaryingVolumetricGrid_TEST.cc"], + deps = [ + ":TimeVaryingVolumetricGrid", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "TimeVaryingVolumetricGridLookupField", + hdrs = ["include/gz/math/TimeVaryingVolumetricGridLookupField.hh"], + includes = ["include"], + deps = [ + ":VolumetricGridLookupField", + ], +) + +cc_test( + name = "TimeVaryingVolumetricGridLookupField_TEST", + srcs = ["src/TimeVaryingVolumetricGridLookupField_TEST.cc"], + deps = [ + ":TimeVaryingVolumetricGridLookupField", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Triangle", + hdrs = ["include/gz/math/Triangle.hh"], + includes = ["include"], + deps = [ + ":Helpers", + ":Line2", + ], +) + +cc_test( + name = "Triangle_TEST", + srcs = ["src/Triangle_TEST.cc"], + deps = [ + ":Triangle", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Triangle3", + hdrs = ["include/gz/math/Triangle3.hh"], + includes = ["include"], + deps = [ + ":Helpers", + ":Line3", + ":Plane", + ], +) + +cc_test( + name = "Triangle3_TEST", + srcs = ["src/Triangle3_TEST.cc"], + deps = [ + ":Triangle3", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Vector2", + hdrs = ["include/gz/math/Vector2.hh"], + includes = ["include"], + deps = [":Helpers"], +) + +cc_test( + name = "Vector2_TEST", + srcs = ["src/Vector2_TEST.cc"], + deps = [ + ":Helpers", + ":Vector2", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Vector3", + hdrs = ["include/gz/math/Vector3.hh"], + includes = ["include"], + deps = [":Helpers"], +) + +cc_test( + name = "Vector3_TEST", + srcs = ["src/Vector3_TEST.cc"], + deps = [ + ":Vector3", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Vector3Stats", + srcs = ["src/Vector3Stats.cc"], + hdrs = ["include/gz/math/Vector3Stats.hh"], + includes = ["include"], + deps = [ + ":Helpers", + ":SignalStats", + ":Vector3", + ], +) + +cc_test( + name = "Vector3Stats_TEST", + srcs = ["src/Vector3Stats_TEST.cc"], + deps = [ + ":Vector3Stats", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "Vector4", + hdrs = ["include/gz/math/Vector4.hh"], + includes = ["include"], + deps = [ + ":Matrix4", + ], +) + +cc_test( + name = "Vector4_TEST", + srcs = ["src/Vector4_TEST.cc"], + deps = [ + ":Helpers", + ":Vector4", + "@googletest//:gtest_main", + ], +) + +cc_library( + name = "VolumetricGridLookupField", + hdrs = ["include/gz/math/VolumetricGridLookupField.hh"], + includes = ["include"], + deps = [ + ":InterpolationPoint", + ":Vector3", + ], +) + +cc_test( + name = "VolumetricGridLookupField_TEST", + srcs = ["src/VolumetricGridLookupField_TEST.cc"], + deps = [ + ":VolumetricGridLookupField", + "@googletest//:gtest_main", + ], +) + +buildifier( + name = "buildifier.fix", + exclude_patterns = ["./.git/*"], + lint_mode = "fix", + mode = "fix", +) + +buildifier_test( + name = "buildifier.test", + exclude_patterns = ["./.git/*"], + lint_mode = "warn", + mode = "diff", + no_sandbox = True, + workspace = "//:MODULE.bazel", +) + diff --git a/MODULE.bazel b/MODULE.bazel index ed5a5444..f6ef7f6a 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -10,12 +10,12 @@ bazel_dep(name = "rules_license", version = "0.0.8") bazel_dep(name = "eigen", version = "3.4.0") # Gazebo Dependencies -bazel_dep(name = "rules_gz") +bazel_dep(name = "rules_gazebo") bazel_dep(name = "gz-utils") local_path_override( - module_name = "rules_gz", - path = "/usr/local/google/home/mjcarroll/workspaces/gz_ionic_bazel/rules_gz", + module_name = "rules_gazebo", + path = "/usr/local/google/home/mjcarroll/workspaces/gz_ionic_bazel/rules_gazebo", ) local_path_override( diff --git a/eigen3/BUILD.bazel b/eigen3/BUILD.bazel index 6ffa07de..17b53153 100644 --- a/eigen3/BUILD.bazel +++ b/eigen3/BUILD.bazel @@ -1,43 +1,3 @@ -load("@rules_gz//gz:headers.bzl", "gz_include_header") - package( default_applicable_licenses = ["//:license"], ) - -public_headers = glob([ - "include/gz/math/eigen3/*.hh", -]) - -gz_include_header( - name = "eigen3_hh_genrule", - out = "include/gz/math/eigen3.hh", - hdrs = public_headers, -) - -cc_library( - name = "eigen3", - srcs = public_headers, - hdrs = public_headers + [ - "include/gz/math/eigen3.hh", - ], - includes = ["include"], - deps = [ - "//:gz-math", - "@eigen", - ], -) - -test_sources = glob( - [ - "src/*_TEST.cc", - ], -) - -[cc_test( - name = src.replace("/", "_").replace(".cc", "").replace("src_", ""), - srcs = [src], - deps = [ - ":eigen3", - "@googletest//:gtest_main", - ], -) for src in test_sources] diff --git a/include/gz/math/Matrix3.hh b/include/gz/math/Matrix3.hh index 3f27b072..e257f20a 100644 --- a/include/gz/math/Matrix3.hh +++ b/include/gz/math/Matrix3.hh @@ -21,9 +21,8 @@ #include #include #include -#include -#include #include +#include namespace gz::math {