-
Notifications
You must be signed in to change notification settings - Fork 990
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature] Added cross-building conf variable (#15616)
* Added tools.build.cross_building:force to force or not the cross-building mechanism * Fixed tests * Renamed
- Loading branch information
1 parent
c043da6
commit 1c18f76
Showing
4 changed files
with
23 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pytest | ||
|
||
from conan.tools.build import cross_building | ||
from conans.test.utils.mocks import ConanFileMock | ||
|
||
|
||
@pytest.mark.parametrize("cross_build", (True, False)) | ||
def test_using_cross_build_conf(cross_build): | ||
""" | ||
Tests cross_building function is using the conf variable to force or not. | ||
Issue related: https://github.com/conan-io/conan/issues/15392 | ||
""" | ||
conanfile = ConanFileMock() | ||
conanfile.conf.define("tools.build.cross_building:cross_build", cross_build) | ||
assert cross_building(conanfile) == cross_build |