提交 38566707 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Merge branch 'issue-347' into v3

...@@ -263,12 +263,12 @@ def _CreateVersion(name, path, sdk_based=False): ...@@ -263,12 +263,12 @@ def _CreateVersion(name, path, sdk_based=False):
'2019': VisualStudioVersion('2019', '2019': VisualStudioVersion('2019',
'Visual Studio 2019', 'Visual Studio 2019',
solution_version='12.00', solution_version='12.00',
project_version='15.0', project_version='16.0',
flat_sln=False, flat_sln=False,
uses_vcxproj=True, uses_vcxproj=True,
path=path, path=path,
sdk_based=sdk_based, sdk_based=sdk_based,
default_toolset='v141', default_toolset='v142',
compatible_sdks=['v8.1', 'v10.0']), compatible_sdks=['v8.1', 'v10.0']),
'2017': VisualStudioVersion('2017', '2017': VisualStudioVersion('2017',
'Visual Studio 2017', 'Visual Studio 2017',
...@@ -409,7 +409,8 @@ def _DetectVisualStudioVersions(versions_to_check, force_express): ...@@ -409,7 +409,8 @@ def _DetectVisualStudioVersions(versions_to_check, force_express):
'11.0': '2012', '11.0': '2012',
'12.0': '2013', '12.0': '2013',
'14.0': '2015', '14.0': '2015',
'15.0': '2017' '15.0': '2017',
'16.0': '2019'
} }
versions = [] versions = []
for version in versions_to_check: for version in versions_to_check:
...@@ -448,9 +449,12 @@ def _DetectVisualStudioVersions(versions_to_check, force_express): ...@@ -448,9 +449,12 @@ def _DetectVisualStudioVersions(versions_to_check, force_express):
if not path: if not path:
continue continue
path = _ConvertToCygpath(path) path = _ConvertToCygpath(path)
if version == '15.0': if version == '16.0':
if os.path.exists(path): if os.path.exists(path):
versions.append(_CreateVersion('2017', path)) versions.append(_CreateVersion('2019', path))
elif version == '15.0':
if os.path.exists(path):
versions.append(_CreateVersion('2017', path))
elif version != '14.0': # There is no Express edition for 2015. elif version != '14.0': # There is no Express edition for 2015.
versions.append(_CreateVersion(version_to_year[version] + 'e', versions.append(_CreateVersion(version_to_year[version] + 'e',
os.path.join(path, '..'), sdk_based=True)) os.path.join(path, '..'), sdk_based=True))
...@@ -470,7 +474,7 @@ def SelectVisualStudioVersion(version='auto', allow_fallback=True): ...@@ -470,7 +474,7 @@ def SelectVisualStudioVersion(version='auto', allow_fallback=True):
if version == 'auto': if version == 'auto':
version = os.environ.get('GYP_MSVS_VERSION', 'auto') version = os.environ.get('GYP_MSVS_VERSION', 'auto')
version_map = { version_map = {
'auto': ('15.0', '14.0', '12.0', '10.0', '9.0', '8.0', '11.0'), 'auto': ('16.0', '15.0', '14.0', '12.0', '10.0', '9.0', '8.0', '11.0'),
'2005': ('8.0',), '2005': ('8.0',),
'2005e': ('8.0',), '2005e': ('8.0',),
'2008': ('9.0',), '2008': ('9.0',),
...@@ -483,6 +487,7 @@ def SelectVisualStudioVersion(version='auto', allow_fallback=True): ...@@ -483,6 +487,7 @@ def SelectVisualStudioVersion(version='auto', allow_fallback=True):
'2013e': ('12.0',), '2013e': ('12.0',),
'2015': ('14.0',), '2015': ('14.0',),
'2017': ('15.0',), '2017': ('15.0',),
'2019': ('16.0',),
} }
override_path = os.environ.get('GYP_MSVS_OVERRIDE_PATH') override_path = os.environ.get('GYP_MSVS_OVERRIDE_PATH')
if override_path: if override_path:
......
...@@ -102,11 +102,13 @@ def IsPathSection(section): ...@@ -102,11 +102,13 @@ def IsPathSection(section):
base_non_configuration_keys = [ base_non_configuration_keys = [
# Sections that must exist inside targets and not configurations. # Sections that must exist inside targets and not configurations.
'actions', 'actions',
'all_dependent_settings',
'configurations', 'configurations',
'copies', 'copies',
'default_configuration', 'default_configuration',
'dependencies', 'dependencies',
'dependencies_original', 'dependencies_original',
'direct_dependent_settings',
'libraries', 'libraries',
'postbuilds', 'postbuilds',
'product_dir', 'product_dir',
......
{
"targets": [
{
"target_name": "settings",
"type": "none",
"all_dependent_settings": {
"target_conditions": [
["'library' in _type", {"all_dependent_settings": {}}]
]
},
},
{
"target_name": "library",
"type": "static_library",
"dependencies": ["settings"],
},
]
}
{
"targets": [
{
"target_name": "settings",
"type": "none",
"all_dependent_settings": {
"target_conditions": [
["'library' in _type", {"direct_dependent_settings": {}}]
]
},
},
{
"target_name": "library",
"type": "static_library",
"dependencies": ["settings"],
},
]
}
#!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies nested dependent_settings directives project generation.
"""
import TestGyp
test = TestGyp.TestGyp()
test.run_gyp("all-dependent-settings.gyp")
test.run_gyp("direct-dependent-settings.gyp")
test.pass_test()
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论