skip over uninitialized and internal variables. correctly identify all kinds of boolean values

This commit is contained in:
Axel Kohlmeyer
2020-09-18 23:40:31 -04:00
parent 9cdde97863
commit 6dda562501

View File

@ -17,10 +17,12 @@ class PythonCapabilities(unittest.TestCase):
if not line or line.startswith('#') or line.startswith('//'): continue
parts = line.split('=')
key, value_type = parts[0].split(':')
if value_type == "UNINITIALIZED": continue
if value_type == "INTERNAL": continue
if len(parts) > 1:
value = parts[1]
if value_type == "BOOL":
value = (value.upper() == "ON")
value = (value.upper() == "ON") or (value.upper() == "YES") or (value == "1")
else:
value = None
self.cmake_cache[key] = value