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)
| 1407 | |
| 1408 | |
| 1409 | def _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 | |
| 1436 | def _AddConfigurationToMSVS(p, spec, tools, config, config_type, config_name): |
no test coverage detected