in memory_statistics/memory_statistics.py [0:0]
def validate_library_config(config):
'''
Config file should contain a json object with the following keys:
"lib_name": Name to use for the library in the table header
"src": Array of source paths to measure sizes of
"include": Array of include directories
"compiler_flags": (optional) Array of extra flags to use for compiling
'''
if "lib_name" not in config:
print("Error: Config file is missing \"lib_name\" key.")
sys.exit(1)
if "src" not in config:
print("Error: Config file is missing \"src\" key.")
sys.exit(1)
if "include" not in config:
print("Error: Config file is missing \"include\" key.")
sys.exit(1)
if "compiler_flags" not in config:
config["compiler_flags"] = []