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>
This commit is contained in:
Axel Huebl 2023-06-27 22:42:57 +02:00 committed by GitHub
parent d960d29485
commit 526ae84137
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -489,9 +489,7 @@ def determine_version(cls, exe):
@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: