# This cmake module contains utilities to read and load libc config options # listed in config.json files. # # The JSON parsing commands that CMake provides are rather tedious to use. # Below is a quick reference which tries to map the CMake JSON parsing # commands to the Python dictionary API. # # * There is no way to iterate over the JSON items. One will first # have to find the number of items using string(JSON ... LENGTH ...) # command, and then iterate over the items using foreach(... RANGE ...). # * The way to get the key from the JSON dictionary is to use the index # of the item and the string(JSON ... MEMBER ... $) function. # * Once you have the key, you can use the string(JSON ... GET ... $) # function to get the value corresponding to the key. # Fill |opt_list| with all options listed in |config_file|. For each option, # the item added to |opt_list| is the dictionary of the form: # { # "