diff options
author | Pranav Sivaraman <pranavsivaraman@gmail.com> | 2024-07-18 10:15:35 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-18 10:15:35 -0700 |
commit | f31f58ff26da2d03180dbee208af9da6b1e1d9d2 (patch) | |
tree | 28959e6ae8ac01e624ff5c1d5459ee425b307d76 /var | |
parent | f84918da4b0e475dcb4e839a6f751d30853007d5 (diff) | |
download | spack-f31f58ff26da2d03180dbee208af9da6b1e1d9d2.tar.gz spack-f31f58ff26da2d03180dbee208af9da6b1e1d9d2.tar.bz2 spack-f31f58ff26da2d03180dbee208af9da6b1e1d9d2.tar.xz spack-f31f58ff26da2d03180dbee208af9da6b1e1d9d2.zip |
magic-enum: add version 0.9.6 (#45284)
* magic-enum: add version 0.9.6
* magic-enum: add maintainer
---------
Co-authored-by: pranav-sivaraman <pranav-sivaraman@users.noreply.github.com>
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/magic-enum/package.py | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/magic-enum/package.py b/var/spack/repos/builtin/packages/magic-enum/package.py new file mode 100644 index 0000000000..faa5b67ec2 --- /dev/null +++ b/var/spack/repos/builtin/packages/magic-enum/package.py @@ -0,0 +1,44 @@ +# 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 MagicEnum(CMakePackage): + """Header-only C++17 library provides static reflection for enums, + work with any enum type without any macro or boilerplate code.""" + + homepage = "https://github.com/Neargye/magic_enum" + url = "https://github.com/Neargye/magic_enum/archive/refs/tags/v0.9.6.tar.gz" + + maintainers("pranav-sivaraman") + + license("MIT", checked_by="pranav-sivaraman") + + version("0.9.6", sha256="814791ff32218dc869845af7eb89f898ebbcfa18e8d81aa4d682d18961e13731") + + variant("examples", default=False, description="Enable examples") + variant("tests", default=True, description="Enable tests") + + # minimum supported versions + conflicts("%clang@:5") + conflicts("%gcc@:9") + conflicts("%msvc@:14.11") + conflicts("%apple-clang@:10") + + depends_on("cxx", type="build") + + depends_on("cmake@3.14:", type="build") + + def cmake_args(self): + from_variant = self.define_from_variant + + args = [ + from_variant("MAGIC_ENUM_OPT_BUILD_EXAMPLES", "examples"), + from_variant("MAGIC_ENUM_OPT_BUILD_TESTS", "tests"), + ] + + return args |