MCPcopy Create free account
hub / github.com/nodejs/node / _ConvertToolsToExpectedForm

Function _ConvertToolsToExpectedForm

tools/gyp/pylib/gyp/generator/msvs.py:1409–1433  ·  view source on GitHub ↗

Convert tools to a form expected by Visual Studio. Arguments: tools: A dictionary of settings; the tool name is the key. Returns: A list of Tool objects.

(tools)

Source from the content-addressed store, hash-verified

1407
1408
1409def _ConvertToolsToExpectedForm(tools):
1410 """Convert tools to a form expected by Visual Studio.
1411
1412 Arguments:
1413 tools: A dictionary of settings; the tool name is the key.
1414 Returns:
1415 A list of Tool objects.
1416 """
1417 tool_list = []
1418 for tool, settings in tools.items():
1419 # Collapse settings with lists.
1420 settings_fixed = {}
1421 for setting, value in settings.items():
1422 if isinstance(value, list):
1423 if (
1424 tool == "VCLinkerTool" and setting == "AdditionalDependencies"
1425 ) or setting == "AdditionalOptions":
1426 settings_fixed[setting] = " ".join(value)
1427 else:
1428 settings_fixed[setting] = ";".join(value)
1429 else:
1430 settings_fixed[setting] = value
1431 # Add in this tool.
1432 tool_list.append(MSVSProject.Tool(tool, settings_fixed))
1433 return tool_list
1434
1435
1436def _AddConfigurationToMSVS(p, spec, tools, config, config_type, config_name):

Callers 1

_AddConfigurationToMSVSFunction · 0.85

Calls 3

itemsMethod · 0.45
joinMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected