diff options
author | Axel Huebl <axel.huebl@plasma.ninja> | 2023-06-27 22:42:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-27 16:42:57 -0400 |
commit | 526ae841371fcf344bb0c35e881198bc4e86641c (patch) | |
tree | 820d6d39c32abd0536d329263c92edc14ca8e827 | |
parent | d960d29485ec5c0c5c6674d817bc50cbdf214c3d (diff) | |
download | spack-526ae841371fcf344bb0c35e881198bc4e86641c.tar.gz spack-526ae841371fcf344bb0c35e881198bc4e86641c.tar.bz2 spack-526ae841371fcf344bb0c35e881198bc4e86641c.tar.xz spack-526ae841371fcf344bb0c35e881198bc4e86641c.zip |
HDF5: is_enabled helper (ON) (#35705)
* HDF5: is_enabled helper (ON)
Slightly generalize the `is_enabled` helper in the HDF5 package.
`ON` is the most typical CMake bool option passed, besides many
other possible `true` values, and should be included as a possible
check to the config.
* Simplify
---------
Co-authored-by: Tamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>
-rw-r--r-- | var/spack/repos/builtin/packages/hdf5/package.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/var/spack/repos/builtin/packages/hdf5/package.py b/var/spack/repos/builtin/packages/hdf5/package.py index 1a48d47158..dcff5904eb 100644 --- a/var/spack/repos/builtin/packages/hdf5/package.py +++ b/var/spack/repos/builtin/packages/hdf5/package.py @@ -489,9 +489,7 @@ class Hdf5(CMakePackage): @classmethod def determine_variants(cls, exes, version): def is_enabled(text): - if text in set(["t", "true", "enabled", "yes", "1"]): - return True - return False + return text.lower() in ["t", "true", "enabled", "yes", "1", "on"] results = [] for exe in exes: |