mirror of
https://github.com/conan-io/conan-center-index.git
synced 2025-05-23 18:30:35 +00:00
android-ndk: dont set LD and AS variables (#26581)
* android-ndk: dont set LD and AS variables * android-ndk: refactor test package
This commit is contained in:
@ -300,8 +300,6 @@ class AndroidNDKConan(ConanFile):
|
||||
self.conf_info.update("tools.build:compiler_executables", compiler_executables)
|
||||
self.buildenv_info.define_path("CC", compiler_executables["c"])
|
||||
self.buildenv_info.define_path("CXX", compiler_executables["cpp"])
|
||||
self.buildenv_info.define_path("AS", compiler_executables["c"])
|
||||
self.buildenv_info.define_path("LD", compiler_executables["cpp"])
|
||||
|
||||
# Versions greater than 23 had the naming convention
|
||||
# changed to no longer include the triplet.
|
||||
|
@ -10,8 +10,13 @@ class TestPackgeConan(ConanFile):
|
||||
generators = "CMakeToolchain", "VirtualBuildEnv"
|
||||
test_type = "explicit"
|
||||
|
||||
def build_requirements(self):
|
||||
self.tool_requires(self.tested_reference_str)
|
||||
def requirements(self):
|
||||
if self.settings.os == "Android":
|
||||
# Assume we're testing as a tool requires
|
||||
self.tool_requires(self.tested_reference_str)
|
||||
else:
|
||||
# only test the contents of the package on the current machine
|
||||
self.requires(self.tested_reference_str)
|
||||
|
||||
def layout(self):
|
||||
cmake_layout(self)
|
||||
@ -28,7 +33,8 @@ class TestPackgeConan(ConanFile):
|
||||
ndk_version = Version(self.tested_reference_str.split('/')[1])
|
||||
skip_run = platform.system() == "Darwin" and "arm" in platform.processor() and ndk_version < "r23c"
|
||||
if not skip_run:
|
||||
self.run(f"{ndk_build} --version", env="conanbuild")
|
||||
run_env = "conanbuild" if self.settings.os == "Android" else "conanrun"
|
||||
self.run(f"{ndk_build} --version", env=run_env)
|
||||
else:
|
||||
self.output.warning("Skipped running ndk-build on macOS Apple Silicon in arm64 mode, please use a newer"
|
||||
" version of the Android NDK")
|
||||
|
Reference in New Issue
Block a user