Lines Matching full:yaml

5 # CMake YAML module for handling of YAML files.
7 # This module offers basic support for simple yaml files.
45 # Internal helper function for checking that a YAML context has been created
54 message(FATAL_ERROR "YAML context '${ARG_YAML_NAME}' does not exist."
55 "Remember to create a YAML context using 'yaml_create()' or 'yaml_load()'"
60 # Internal helper function for checking if a YAML context is free before creating
69 message(FATAL_ERROR "YAML context '${ARG_YAML_NAME}' already exists."
70 "Please create a YAML context with a unique name"
78 # Function to query the status of the YAML context with the name <name>.
81 # EXISTS : Check if the YAML context exists in the current scope
83 # NAME <name>: Name of the YAML context
108 # Create a new empty YAML context.
113 # specified when creating the YAML context.
115 # NAME <name>: Name of the YAML context.
116 # FILE <file>: Path to file to be used together with this YAML context.
134 # Load an existing YAML file and store its content in the YAML context <name>.
137 # the same YAML scope name.
140 # NAME <name>: Name of the YAML context.
152 "import json; import yaml; print(json.dumps(yaml.safe_load(open('${ARG_YAML_FILE}'))))"
159 message(FATAL_ERROR "Failed to load content of YAML file: ${ARG_YAML_FILE}\n"
175 # NAME <name> : Name of the YAML context.
218 # NAME <name> : Name of the YAML context.
238 message(WARNING "YAML key: ${ARG_YAML_KEY} is not an array.")
252 # NAME <name> : Name of the YAML context.
323 # Remove the KEY <key>... from the YAML context <name>.
330 # NAME <name>: Name of the YAML context.
348 # Write the YAML context <name> to the file which were given with the earlier
351 # NAME <name>: Name of the YAML context
353 # If not given, then the FILE property of the YAML context will be
355 # on the YAML context, then an error will be raised.
382 function(to_yaml json level yaml)
401 set(${yaml} "${${yaml}}${indent_${level}}${member}:\n")
403 to_yaml("${subjson}" ${sublevel} ${yaml})
405 set(${yaml} "${${yaml}}${indent_${level}}${member}:")
408 set(${yaml} "${${yaml}} []\n")
410 set(${yaml} "${${yaml}}\n")
414 set(${yaml} "${${yaml}}${indent_${level}} - ${item}\n")
418 set(${yaml} "${${yaml}}${indent_${level}}${member}: ${subjson}\n")
422 set(${yaml} ${${yaml}} PARENT_SCOPE)