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

Function _GetMSBuildPropertySheets

tools/gyp/pylib/gyp/generator/msvs.py:3041–3086  ·  view source on GitHub ↗
(configurations, spec)

Source from the content-addressed store, hash-verified

3039
3040
3041def _GetMSBuildPropertySheets(configurations, spec):
3042 user_props = r"$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props"
3043 additional_props = {}
3044 props_specified = False
3045 for name, settings in sorted(configurations.items()):
3046 configuration = _GetConfigurationCondition(name, settings, spec)
3047 if "msbuild_props" in settings:
3048 additional_props[configuration] = _FixPaths(settings["msbuild_props"])
3049 props_specified = True
3050 else:
3051 additional_props[configuration] = ""
3052
3053 if not props_specified:
3054 return [
3055 [
3056 "ImportGroup",
3057 {"Label": "PropertySheets"},
3058 [
3059 "Import",
3060 {
3061 "Project": user_props,
3062 "Condition": "exists('%s')" % user_props,
3063 "Label": "LocalAppDataPlatform",
3064 },
3065 ],
3066 ]
3067 ]
3068 else:
3069 sheets = []
3070 for condition, props in additional_props.items():
3071 import_group = [
3072 "ImportGroup",
3073 {"Label": "PropertySheets", "Condition": condition},
3074 [
3075 "Import",
3076 {
3077 "Project": user_props,
3078 "Condition": "exists('%s')" % user_props,
3079 "Label": "LocalAppDataPlatform",
3080 },
3081 ],
3082 ]
3083 for props_file in props:
3084 import_group.append(["Import", {"Project": props_file}])
3085 sheets.append(import_group)
3086 return sheets
3087
3088
3089def _ConvertMSVSBuildAttributes(spec, config, build_file):

Callers 1

_GenerateMSBuildProjectFunction · 0.85

Calls 5

sortedFunction · 0.85
_FixPathsFunction · 0.85
itemsMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected