CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
52 lines
2.0 KiB
Python
Executable File
52 lines
2.0 KiB
Python
Executable File
#!/usr/bin/env python
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# Note: Conan is supported on a best-effort basis. Abseil doesn't use Conan
|
|
# internally, so we won't know if it stops working. We may ask community
|
|
# members to help us debug any problems that arise.
|
|
|
|
from conans import ConanFile, CMake, tools
|
|
from conans.errors import ConanInvalidConfiguration
|
|
from conans.model.version import Version
|
|
|
|
|
|
class AbseilConan(ConanFile):
|
|
name = "abseil"
|
|
url = "https://github.com/abseil/abseil-cpp"
|
|
homepage = url
|
|
author = "Abseil <abseil-io@googlegroups.com>"
|
|
description = "Abseil Common Libraries (C++) from Google"
|
|
license = "Apache-2.0"
|
|
topics = ("conan", "abseil", "abseil-cpp", "google", "common-libraries")
|
|
exports = ["LICENSE"]
|
|
exports_sources = ["CMakeLists.txt", "CMake/*", "absl/*"]
|
|
generators = "cmake"
|
|
settings = "os", "arch", "compiler", "build_type"
|
|
|
|
def configure(self):
|
|
if self.settings.os == "Windows" and \
|
|
self.settings.compiler == "Visual Studio" and \
|
|
Version(self.settings.compiler.version.value) < "14":
|
|
raise ConanInvalidConfiguration("Abseil does not support MSVC < 14")
|
|
|
|
def build(self):
|
|
tools.replace_in_file("CMakeLists.txt", "project(absl LANGUAGES CXX)", "project(absl LANGUAGES CXX)\ninclude(conanbuildinfo.cmake)\nconan_basic_setup()")
|
|
cmake = CMake(self)
|
|
cmake.definitions["BUILD_TESTING"] = False
|
|
cmake.configure()
|
|
cmake.build()
|
|
|
|
def package(self):
|
|
self.copy("LICENSE", dst="licenses")
|
|
self.copy("*.h", dst="include", src=".")
|
|
self.copy("*.inc", dst="include", src=".")
|
|
self.copy("*.a", dst="lib", src=".", keep_path=False)
|
|
self.copy("*.lib", dst="lib", src=".", keep_path=False)
|
|
|
|
def package_info(self):
|
|
if self.settings.os == "Linux":
|
|
self.cpp_info.libs = ["-Wl,--start-group"]
|
|
self.cpp_info.libs.extend(tools.collect_libs(self))
|
|
if self.settings.os == "Linux":
|
|
self.cpp_info.libs.extend(["-Wl,--end-group", "pthread"])
|