-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(#12956) [libcurl/xxx] Conan v2 migration
* [libcurl/xxx] Conan v2 migration * Use VirtualRunEnv * Bump wolfssl and libnghttp2 * Fix linter issues * Use cmake_layout conditionaly * Add test_type and tested_reference_str * Fix test_package * Add basic_layout * Delete compiler in package_id * Fix basic_layout * Update cacert.pem sha256 * Use old syntax for bin path * Revert "Use old syntax for bin path" This reverts commit 3d5aec8. * Use old syntax for test_v1_package bin path * Remove conans.tools.get_env * Use export_conandata_patches * Update recipes/libcurl/all/conanfile.py Co-authored-by: Uilian Ries <uilianries@gmail.com> * Use info.options/settings * Apply suggestions from code review Co-authored-by: Uilian Ries <uilianries@gmail.com> Co-authored-by: Jordan Williams <jordan@jwillikers.com> * Fix indentation * Add pkgconf conditionnaly Co-authored-by: Uilian Ries <uilianries@gmail.com> * Fix if condition Co-authored-by: Uilian Ries <uilianries@gmail.com> Co-authored-by: Jordan Williams <jordan@jwillikers.com>
- Loading branch information
1 parent
923318d
commit abf39ae
Showing
7 changed files
with
288 additions
and
260 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -29,4 +29,3 @@ sources: | |
patches: | ||
"7.79.0": | ||
- patch_file: "patches/004-no-checksrc.patch" | ||
base_path: "source_subfolder" |
Large diffs are not rendered by default.
Oops, something went wrong.
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,10 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(test_package C) | ||
|
||
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) | ||
conan_basic_setup(TARGETS) | ||
|
||
find_package(CURL REQUIRED) | ||
|
||
add_executable(${PROJECT_NAME} ../test_package/test_package.c) | ||
target_link_libraries(${PROJECT_NAME} CURL::libcurl) |
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,43 @@ | ||
from conans import ConanFile, CMake, tools | ||
import os | ||
import subprocess | ||
import re | ||
|
||
|
||
class TestPackageConan(ConanFile): | ||
settings = "os", "compiler", "build_type", "arch" | ||
generators = "cmake", "cmake_find_package" | ||
|
||
def build(self): | ||
cmake = CMake(self) | ||
cmake.configure() | ||
cmake.build() | ||
|
||
@property | ||
def _test_executable(self): | ||
return os.path.join("bin", "test_package") | ||
|
||
def test(self): | ||
if not tools.cross_building(self): | ||
self.run(self._test_executable, run_environment=True) | ||
else: | ||
# We will dump information for the generated executable | ||
if self.settings.os in ["Android", "iOS"]: | ||
# FIXME: Check output for these hosts | ||
return | ||
|
||
output = subprocess.check_output(["file", self._test_executable]).decode() | ||
|
||
if self.settings.os == "Macos" and self.settings.arch == "armv8": | ||
assert "Mach-O 64-bit executable arm64" in output, f"Not found in output: {output}" | ||
|
||
elif self.settings.os == "Linux": | ||
if self.settings.arch == "armv8_32": | ||
assert re.search(r"Machine:\s+ARM", output), f"Not found in output: {output}" | ||
elif "armv8" in self.settings.arch: | ||
assert re.search(r"Machine:\s+AArch64", output), f"Not found in output: {output}" | ||
elif "arm" in self.settings.arch: | ||
assert re.search(r"Machine:\s+ARM", output), f"Not found in output: {output}" | ||
|
||
elif self.settings.os == "Windows": # FIXME: It satisfies not only MinGW | ||
assert re.search(r"PE32.*executable.*Windows", output), f"Not found in output: {output}" |