Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix: x86 msbuild platform is Win32, not x86 * MSBuildDeps: map armv7 and armv8 msbuild platforms Fixes #11504 * fixed MSBuildDeps Win32 usage * test: msbuilddeps mapping of arch to platform * fixup: remove incorrect test description Co-authored-by: Mark Ferry <mark@cognomen.co.uk> Co-authored-by: memsharded <james@conan.io>
- Loading branch information
1 parent
b7a8198
commit fa52c51
Showing
3 changed files
with
33 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
conans/test/integration/toolchains/microsoft/test_msbuilddeps.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import os | ||
|
||
import pytest | ||
|
||
from conans.test.utils.tools import TestClient | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"arch,exp_platform", | ||
[ | ||
("x86", "Win32"), | ||
("x86_64", "x64"), | ||
("armv7", "ARM"), | ||
("armv8", "ARM64"), | ||
], | ||
) | ||
def test_msbuilddeps_maps_architecture_to_platform(arch, exp_platform): | ||
client = TestClient(path_with_spaces=False) | ||
client.run("new hello/0.1 --template=msbuild_lib") | ||
client.run(f"install . -g MSBuildDeps -s arch={arch} -pr:b=default -if=install") | ||
toolchain = client.load(os.path.join("conan", "conantoolchain.props")) | ||
expected_import = f"""<Import Condition="'$(Configuration)' == 'Release' And '$(Platform)' == '{exp_platform}'" Project="conantoolchain_release_{exp_platform.lower()}.props"/>""" | ||
assert expected_import in toolchain |