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:
parent
d960d29485
commit
526ae84137
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user