Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing tools to develop (#10536)
* add Version * add more tools * remove not needed
- Loading branch information
Showing
3 changed files
with
23 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
from conans.model.version import Version | ||
|
||
CONAN_TOOLCHAIN_ARGS_FILE = "conanbuild.conf" | ||
CONAN_TOOLCHAIN_ARGS_SECTION = "toolchain" |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
from conan.tools.build.cpu import build_jobs | ||
from conan.tools.build.cross_building import cross_building |
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,20 @@ | ||
|
||
def cross_building(conanfile=None, skip_x64_x86=False): | ||
host_os = conanfile.settings.get_safe("os") | ||
host_arch = conanfile.settings.get_safe("arch") | ||
build_os = conanfile.settings_build.get_safe('os') | ||
build_arch = conanfile.settings_build.get_safe('arch') | ||
|
||
if skip_x64_x86 and host_os is not None and (build_os == host_os) and \ | ||
host_arch is not None and ((build_arch == "x86_64") and (host_arch == "x86") or | ||
(build_arch == "sparcv9") and (host_arch == "sparc") or | ||
(build_arch == "ppc64") and (host_arch == "ppc32")): | ||
return False | ||
|
||
if host_os is not None and (build_os != host_os): | ||
return True | ||
if host_arch is not None and (build_arch != host_arch): | ||
return True | ||
|
||
return False | ||
|