From f809b56f81cbda887e74b847f9bf1d6d0d5cadaa Mon Sep 17 00:00:00 2001
From: Alec Scott <hi@alecbcs.com>
Date: Wed, 30 Oct 2024 15:31:20 -0700
Subject: mpidiff: new package (#47335)

* mpidiff: new package

* fix style with black

* Add variants, docs, and examples variants. Remove options that are not really options in the build.
---
 .../repos/builtin/packages/mpidiff/package.py      | 39 ++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 var/spack/repos/builtin/packages/mpidiff/package.py

(limited to 'var')

diff --git a/var/spack/repos/builtin/packages/mpidiff/package.py b/var/spack/repos/builtin/packages/mpidiff/package.py
new file mode 100644
index 0000000000..47ae0b8ee1
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpidiff/package.py
@@ -0,0 +1,39 @@
+# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+
+from spack.package import *
+
+
+class Mpidiff(CMakePackage):
+    """Library for comparing numerical differences between binaries."""
+
+    homepage = "https://github.com/LLNL/MPIDiff"
+    url = "https://github.com/LLNL/MPIDiff/archive/refs/tags/v0.2.0.tar.gz"
+
+    maintainers("adayton1")
+
+    license("BSD-3-Clause", checked_by="alecbcs")
+
+    version("0.2.0", sha256="726b59fe4af0bb0812fc34c456cb0d801e03313a8fdfb9dc63d23a9b316b6118")
+
+    variant("docs", default=False, description="Build and include documentation")
+    variant("examples", default=False, description="Build and include examples")
+    variant("tests", default=False, description="Build tests")
+
+    depends_on("cxx", type="build")
+
+    depends_on("blt", type="build")
+    depends_on("mpi")
+
+    def cmake_args(self):
+        spec = self.spec
+        return [
+            self.define("MPI_DIR", spec["mpi"].prefix),
+            self.define("BLT_SOURCE_DIR", spec["blt"].prefix),
+            self.define_from_variant("MPIDIFF_ENABLE_DOCS", "docs"),
+            self.define_from_variant("MPIDIFF_ENABLE_EXAMPLES", "examples"),
+            self.define_from_variant("MPIDIFF_ENABLE_TESTS", "tests"),
+        ]
-- 
cgit v1.2.3-70-g09d2