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

Function DisableForSourceTree

tools/gyp/pylib/gyp/generator/msvs.py:1675–1695  ·  view source on GitHub ↗
(source_tree)

Source from the content-addressed store, hash-verified

1673 extensions_excluded_from_precompile = [".c"]
1674
1675 def DisableForSourceTree(source_tree):
1676 for source in source_tree:
1677 if isinstance(source, MSVSProject.Filter):
1678 DisableForSourceTree(source.contents)
1679 else:
1680 _basename, extension = os.path.splitext(source)
1681 if extension in extensions_excluded_from_precompile:
1682 for config_name, config in spec["configurations"].items():
1683 tool = MSVSProject.Tool(
1684 "VCCLCompilerTool",
1685 {
1686 "UsePrecompiledHeader": "0",
1687 "ForcedIncludeFiles": "$(NOINHERIT)",
1688 },
1689 )
1690 p.AddFileConfig(
1691 _FixPath(source),
1692 _ConfigFullName(config_name, config),
1693 {},
1694 tools=[tool],
1695 )
1696
1697 # Do nothing if there was no precompiled source.
1698 if extensions_excluded_from_precompile:

Callers 1

Calls 4

_FixPathFunction · 0.85
_ConfigFullNameFunction · 0.85
AddFileConfigMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected