代码拉取完成,页面将自动刷新
同步操作将从 Michael/async_simple 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
from conan.tools.files import copy, get
import os.path as osp
class AsyncSimpleConan(ConanFile):
name = "async_simple"
version = "1.0.0"
url = "https://github.com/alibaba/async_simple"
description = "Simple, light-weight and easy-to-use asynchronous components"
topics = "coroutine"
license = "Apache-2.0"
settings = "os", "compiler", "build_type", "arch"
options = {
"shared": [True, False],
"fPIC": [True, False],
"header_only": [True, False],
}
default_options = {
"shared": False,
"fPIC": True,
"header_only": True
}
exports_sources = "CMakeLists.txt", "cmake/*", "async_simple/*",
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def configure(self):
if self.options.header_only:
del self.options.shared
del self.options.fPIC
def layout(self):
cmake_layout(self)
def generate(self):
if not self.options.header_only:
tc = CMakeToolchain(self)
tc.variables["ASYNC_SIMPLE_BUILD_DEMO_EXAMPLE"] = False
tc.generate()
deps = CMakeDeps(self)
deps.generate()
def build(self):
if self.options.header_only:
return
cmake = CMake(self)
cmake.configure()
cmake.build()
def package(self):
copy(self, "LICENSE", dst=osp.join(self.package_folder, "licenses"), src=self.source_folder)
if self.options.header_only:
excludes = None
if self.settings.os in ["Macos"]:
excludes = 'uthread', 'test'
copy(self, pattern="*.h",
dst=osp.join(self.package_folder, "include/async_simple"),
src=osp.join(self.source_folder, "async_simple"),
excludes=excludes)
else:
cmake = CMake(self)
cmake.install()
def package_id(self):
if self.info.options.header_only:
self.info.clear()
def package_info(self):
self.cpp_info.names["cmake_find_package"] = "async_simple"
self.cpp_info.components["async_simple"].names["cmake_find_package"] = "async_simple"
if self.options.header_only:
self.cpp_info.components["async_simple"].set_property("cmake_target_name",
f"async_simple::async_simple_header_only")
else:
self.cpp_info.components["async_simple"].set_property("cmake_target_name", f"async_simple::async_simple")
if self.settings.os in ["Macos"]:
self.cpp_info.components["async_simple"].defines = ["ASYNC_SIMPLE_HAS_NOT_AIO=1"]
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。