Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCVars: Fix generation if OS is set to WindowsStore #17849

Open
wants to merge 2 commits into
base: develop2
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion conan/tools/microsoft/visual.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def generate(self, scope="build"):
os_ = conanfile.settings.get_safe("os")
build_os_ = conanfile.settings_build.get_safe("os")

if os_ != "Windows" or build_os_ != "Windows":
if (os_ != "Windows" and os_ != "WindowsStore") or build_os_ != "Windows":
return

compiler = conanfile.settings.get_safe("compiler")
Expand Down
18 changes: 18 additions & 0 deletions test/integration/toolchains/microsoft/vcvars_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,21 @@ class TestConan(ConanFile):

vcvars = client.load("conanvcvars.bat")
assert 'vcvarsall.bat" amd64 -vcvars_ver=14.33' in vcvars

@pytest.mark.skipif(platform.system() != "Windows", reason="Requires Windows")
def test_vcvars_armv8_windows_store():
client = TestClient(path_with_spaces=False)

conanfile = textwrap.dedent("""
from conan import ConanFile
class TestConan(ConanFile):
generators = "VCVars"
settings = "os", "compiler", "arch", "build_type"
""")
client.save({"conanfile.py": conanfile})
client.run('install . -s:b os=Windows -s compiler="msvc" -s compiler.version=194 '
'-s compiler.cppstd=14 -s compiler.runtime=static -s:h arch=armv8 '
'-s:h os=WindowsStore -s:h os.version=10.0')

vcvars = client.load("conanvcvars.bat")
assert 'vcvarsall.bat" amd64_arm64' in vcvars
Loading