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

Function _GetValueFormattedForMSBuild

tools/gyp/pylib/gyp/generator/msvs.py:3443–3469  ·  view source on GitHub ↗
(tool_name, name, value)

Source from the content-addressed store, hash-verified

3441
3442
3443def _GetValueFormattedForMSBuild(tool_name, name, value):
3444 if isinstance(value, list):
3445 # For some settings, VS2010 does not automatically extends the settings
3446 # TODO(jeanluc) Is this what we want?
3447 if name in [
3448 "AdditionalIncludeDirectories",
3449 "AdditionalLibraryDirectories",
3450 "AdditionalOptions",
3451 "DelayLoadDLLs",
3452 "DisableSpecificWarnings",
3453 "PreprocessorDefinitions",
3454 ]:
3455 value.append("%%(%s)" % name)
3456 # For most tools, entries in a list should be separated with ';' but some
3457 # settings use a space. Check for those first.
3458 exceptions = {
3459 "ClCompile": ["AdditionalOptions"],
3460 "Link": ["AdditionalOptions"],
3461 "Lib": ["AdditionalOptions"],
3462 }
3463 char = " " if name in exceptions.get(tool_name, []) else ";"
3464 formatted_value = char.join(
3465 [MSVSSettings.ConvertVCMacrosToMSBuild(i) for i in value]
3466 )
3467 else:
3468 formatted_value = MSVSSettings.ConvertVCMacrosToMSBuild(value)
3469 return formatted_value
3470
3471
3472def _VerifySourcesExist(sources, root_dir):

Calls 3

getMethod · 0.65
appendMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected