Compare commits

9 Commits

Author SHA1 Message Date
174d86dc9a imgui: add version 1.91.8 (#26505)
* Add version 1.91.8/1.91.8-docking
* Remove some older patch levels
2025-02-27 14:05:04 +00:00
8d392de810 asio-grpc: add version 3.4.1 (#22910)
* asio-grpc: Add version 3.0.0

* Removed local_allocator from config_options on >v3.0.0

* asio-grpc: Change v3.0.0 to v3.1.0

* Better way to handle option property

* Fix handling of local_allocator option

* Bumo boost and asio

* asio-grpc: Select lower asio version for older versions of asio-grpc

* asio-grpc: Update 3.1.0 to 3.2.0

* asio-grpc: Update to 3.4.1

---------

Co-authored-by: PerseoGI <perseog@jfrog.com>
Co-authored-by: Abril Rincón Blanco <git@rinconblanco.es>
2025-02-27 13:59:49 +00:00
a34124cfb1 libqasm: add version 1.0.0. (#26499) 2025-02-27 13:05:55 +00:00
204877e3f6 CMake: add version 3.31.6 (#26703) 2025-02-27 12:44:58 +00:00
7baff33db9 Add HFSM2 Recipe (#22647)
* Add HFSM2 Recipe

* #22657 - fix linter errors via adding newlines to end of yaml files

* #22647 - Remove trailing spaces in HFSM2 conandata.yml (introduced while adding newline at end of file)

* Change to only latest version, add newlines to end of files, changes to make CIwork, responding to feedback on PR#22647

* coan-io#22647 - Add newline back, fix issue added when upgrading version to 2.5.1

* conan-io#22657: Try not including the examples and tests

* Remove template comments

* Bump hfm2 version to 2.5.2

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Adapt recipe for Conan 2.x only

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Simplify HFSM2 test package

Signed-off-by: Uilian Ries <uilianries@gmail.com>

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: Uilian Ries <uilianries@gmail.com>
2025-02-27 12:10:53 +00:00
6cdc34101b parlayhash: add new new recipe (#22638)
* ParlayHash: new recipe

* fix linting

* Update recipes/parlay_hash/all/conanfile.py

Co-authored-by: toge <toge.mail@gmail.com>

* fix

* fix test_package

* Update recipes/parlay_hash/all/test_package/test_package.cpp

Co-authored-by: toge <toge.mail@gmail.com>

* Update recipes/parlay_hash/all/conanfile.py

Co-authored-by: toge <toge.mail@gmail.com>

* WOrk for v0.1

* remove temp files

* fix

* Follow upstream target names

* Typo

* Cleanups and support specific macos version, remove msvc support

* Skip Linux Clang as well

Signed-off-by: Uilian Ries <uilianries@gmail.com>

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: toge <toge.mail@gmail.com>
Co-authored-by: Rubén Rincón Blanco <git@rinconblanco.es>
Co-authored-by: Uilian Ries <uilianries@gmail.com>
2025-02-27 12:09:40 +00:00
ddf20d53f7 onetbb: add 2021.13.0 and add recipe flags to build into apple frameworks (#26602)
* Update tbb recipe to allow building as framework

* Update minimum version that has frameworks support

* Add 2021.13.0

* Update script after rebase on master

* update config.yml to include 2021.13.0
2025-02-27 11:48:56 +00:00
28c64921b1 joltphysics: export missing compiler definitions (#26594)
* Expose compiler define for JPH_FLOATING_POINT_EXCEPTIONS

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Add more missing defines

Signed-off-by: Uilian Ries <uilianries@gmail.com>

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
2025-02-27 11:31:08 +00:00
f56e052b6c onetbb: add version 2022.0.0 (#26569)
* Add onetbb/2022.0.0 support

* onetbb: refactor test package

* Add patch for mising tbb namespace

Signed-off-by: Uilian Ries <uilianries@gmail.com>

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: Luis Caro Campos <3535649+jcar87@users.noreply.github.com>
Co-authored-by: Uilian Ries <uilianries@gmail.com>
2025-02-27 11:15:42 +00:00
32 changed files with 407 additions and 176 deletions

View File

@ -1,4 +1,7 @@
sources:
"3.4.1":
url: "https://github.com/Tradias/asio-grpc/archive/refs/tags/v3.4.1.tar.gz"
sha256: "3ca10e22ac628e1983ba87eff4e913e751dd66294a5ea76ca94a60ac014171f9"
"2.9.2":
url: "https://github.com/Tradias/asio-grpc/archive/refs/tags/v2.9.2.tar.gz"
sha256: "a025587278b3332f4c5dd0464b3d5313fbecb89fc58a6ec1d611f693d6b51ef2"

View File

@ -21,11 +21,11 @@ class AsioGrpcConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
options = {
"backend": ["boost", "asio", "unifex"],
"local_allocator": ["auto", "memory_resource", "boost_container", "recycling_allocator"],
"local_allocator": ["memory_resource", "boost_container", "recycling_allocator"],
}
default_options = {
"backend": "boost",
"local_allocator": "auto",
# local_allocator default handled in config_options
}
no_copy_source = True
@ -43,30 +43,37 @@ class AsioGrpcConan(ConanFile):
"apple-clang": "11",
}
def configure(self):
self._local_allocator_option = self.options.local_allocator
if self._local_allocator_option == "auto":
def config_options(self):
if Version(self.version) >= "3.0.0":
del self.options.local_allocator
else:
libcxx = self.settings.compiler.get_safe("libcxx")
compiler_version = Version(self.settings.compiler.version)
prefer_boost_container = libcxx and str(libcxx) == "libc++" or \
(self.settings.compiler == "gcc" and compiler_version < "9") or \
(self.settings.compiler == "clang" and compiler_version < "12" and libcxx and str(libcxx) == "libstdc++")
self._local_allocator_option = "boost_container" if prefer_boost_container else "memory_resource"
if self._local_allocator_option == "recycling_allocator" and self.options.backend == "unifex":
raise ConanInvalidConfiguration(f"{self.name} 'recycling_allocator' cannot be used in combination with the 'unifex' backend.")
(self.settings.compiler == "gcc" and compiler_version < "9") or \
(self.settings.compiler == "clang" and compiler_version < "12" and libcxx and str(libcxx) == "libstdc++")
self.options.local_allocator = "boost_container" if prefer_boost_container else "memory_resource"
def requirements(self):
self.requires("grpc/1.54.3", transitive_libs=True)
if self._local_allocator_option == "boost_container" or self.options.backend == "boost":
self.requires("boost/1.83.0", transitive_headers=True)
use_latest = Version(self.version) > "2.8"
self.requires("grpc/1.67.1", transitive_headers=True, transitive_libs=True)
if (self.options.get_safe("local_allocator") == "boost_container" and Version(self.version) < "3.0.0") or self.options.backend == "boost":
version = "1.86.0" if use_latest else "1.83.0"
self.requires(f"boost/{version}", transitive_headers=True)
if self.options.backend == "asio":
self.requires("asio/1.29.0", transitive_headers=True)
version = "1.32.0" if use_latest else "1.29.0"
self.requires(f"asio/{version}", transitive_headers=True)
if self.options.backend == "unifex":
self.requires("libunifex/0.4.0")
self.requires("libunifex/0.4.0", transitive_headers=True, transitive_libs=True)
def package_id(self):
local_allocator = None
if "local_allocator" in self.info.options:
local_allocator = self.info.options.local_allocator
self.info.clear()
self.info.options.local_allocator = self._local_allocator_option
if local_allocator is not None:
# Keep the local_allocator option in the package_id
self.info.options.local_allocator = local_allocator
def layout(self):
cmake_layout(self, src_folder="src")
@ -81,22 +88,21 @@ class AsioGrpcConan(ConanFile):
raise ConanInvalidConfiguration(
f"{self.name} requires C++{self._min_cppstd}, which your compiler does not support."
)
else:
self.output.warning(
f"{self.name} requires C++{self._min_cppstd}. Your compiler is unknown. Assuming it supports"
f" C++{self._min_cppstd}."
)
if Version(self.version) == "2.7.0" and self.settings.compiler == "gcc" and compiler_version.major == "11" and \
compiler_version < "11.3":
compiler_version < "11.3":
raise ConanInvalidConfiguration(f"{self.ref} does not support gcc 11.0-11.2")
if self.options.get_safe("local_allocator") == "recycling_allocator" and self.options.backend == "unifex":
raise ConanInvalidConfiguration(f'{self.name} -o="&:local_allocator=recycling_allocator" cannot be used in combination with the -o="&:backend=unifex" backend.')
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
def generate(self):
tc = CMakeToolchain(self)
tc.variables["ASIO_GRPC_USE_BOOST_CONTAINER"] = self._local_allocator_option == "boost_container"
tc.variables["ASIO_GRPC_USE_RECYCLING_ALLOCATOR"] = self._local_allocator_option == "recycling_allocator"
if Version(self.version) < "3.0.0":
tc.variables["ASIO_GRPC_USE_BOOST_CONTAINER"] = self.options.get_safe("local_allocator") == "boost_container"
tc.variables["ASIO_GRPC_USE_RECYCLING_ALLOCATOR"] = self.options.get_safe("local_allocator") == "recycling_allocator"
tc.generate()
def build(self):
@ -115,7 +121,7 @@ class AsioGrpcConan(ConanFile):
build_modules = [os.path.join("lib", "cmake", "asio-grpc", "AsioGrpcProtobufGenerator.cmake")]
self.cpp_info.requires = ["grpc::grpc++_unsecure"]
self.cpp_info.requires = ["grpc::grpc++"]
if self.options.backend == "boost":
self.cpp_info.defines = ["AGRPC_BOOST_ASIO"]
self.cpp_info.requires.append("boost::headers")
@ -126,7 +132,7 @@ class AsioGrpcConan(ConanFile):
self.cpp_info.defines = ["AGRPC_UNIFEX"]
self.cpp_info.requires.append("libunifex::unifex")
if self._local_allocator_option == "boost_container":
if self.options.get_safe("local_allocator") == "boost_container" and Version(self.version) < "3.0.0":
self.cpp_info.requires.append("boost::container")
self.cpp_info.set_property("cmake_file_name", "asio-grpc")

View File

@ -7,10 +7,6 @@ add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE asio-grpc::asio-grpc)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)
# See https://github.com/chriskohlhoff/asio/issues/955
target_compile_definitions(${PROJECT_NAME}
PRIVATE BOOST_ASIO_DISABLE_STD_ALIGNED_ALLOC)
if(${asio-grpc_VERSION} VERSION_GREATER_EQUAL 2)
target_compile_definitions(${PROJECT_NAME} PRIVATE ASIO_GRPC_V2)
endif()

View File

@ -16,21 +16,10 @@ int main() {
boost::asio::post(grpc_context, [] {});
#ifndef CROSSCOMPILING
std::unique_ptr<test::Test::Stub> stub;
grpc::ClientContext client_context;
std::unique_ptr<grpc::ClientAsyncResponseReader<test::TestReply>> reader;
test::TestRequest request;
test::TestReply response;
grpc::Status status;
boost::asio::post(grpc_context, [&]() {
stub = test::Test::NewStub(grpc::CreateChannel(
boost::asio::post(grpc_context, []() {
[[maybe_unused]] auto stub = test::Test::NewStub(grpc::CreateChannel(
"localhost:50051", grpc::InsecureChannelCredentials()));
request.set_message("hello");
reader = agrpc::request(&test::Test::Stub::AsyncUnary, *stub,
client_context, request, grpc_context);
agrpc::finish(reader, response, status,
boost::asio::bind_executor(grpc_context, [](bool) {}));
[[maybe_unused]] test::TestRequest request;
});
#endif
}

View File

@ -1,4 +1,6 @@
versions:
"3.4.1":
folder: all
"2.9.2":
folder: all
"2.7.0":

View File

@ -1,4 +1,23 @@
sources:
"3.31.6":
Linux:
armv8:
url: "https://cmake.org/files/v3.31/cmake-3.31.6-linux-aarch64.tar.gz"
sha256: "b4cc788d63112b2749b40627e719eb5d3b8ed8f00c36d77189f4019cfe64bc9e"
x86_64:
url: "https://cmake.org/files/v3.31/cmake-3.31.6-linux-x86_64.tar.gz"
sha256: "5a1133ff103c71eb5120e2cc3de922733e7d8a26a98ae716397e8676adb367bf"
Macos:
universal:
url: "https://cmake.org/files/v3.31/cmake-3.31.6-macos10.10-universal.tar.gz"
sha256: "dc49fe67e0841e1d21b9e694d4858bbc06118165be5ebd8da0f2028216d56e6c"
Windows:
armv8:
url: "https://cmake.org/files/v3.31/cmake-3.31.6-windows-arm64.zip"
sha256: "fa648fd417f44e6cb08928964a480ade0d18df421f9b623639dba22f9b301e4e"
x86_64:
url: "https://cmake.org/files/v3.31/cmake-3.31.6-windows-x86_64.zip"
sha256: "d163cd3ab4959b0a53fa8988f2ddbd2e6c501658201e6a154386bad9dbe4f836"
"3.31.5":
Linux:
armv8:

View File

@ -1,4 +1,6 @@
versions:
"3.31.6":
folder: "binary"
"3.31.5":
folder: "binary"
"3.31.3":

View File

@ -0,0 +1,4 @@
sources:
"2.5.2":
url: "https://github.com/andrew-gresyk/HFSM2/archive/refs/tags/2.5.2.tar.gz"
sha256: "b5a35ce065ea3e32cf9cda48813877e35526a0e377b9344f726d1d80aeaeaa5d"

View File

@ -0,0 +1,40 @@
import os
from conan import ConanFile
from conan.tools.files import copy
from conan.tools.build import check_min_cppstd
from conan.tools.layout import basic_layout
from conan.tools.files import get
required_conan_version = ">=2.0"
class Hfsm2Conan(ConanFile):
name = "hfsm2"
description = "High-Performance Hierarchical Finite State Machine Framework"
license = "MIT"
topics = ("embedded", "fsm", "state-machine", "cpp", "modern-cpp", "game-development",
"cpp11", "embedded-systems", "template-metaprogramming", "header-only",
"mit-license", "fsm-library", "hierarchical-state-machine", "game-dev", "hfsm")
homepage = "https://hfsm.dev/"
url = "https://github.com/conan-io/conan-center-index"
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True
def layout(self):
basic_layout(self, src_folder="src")
def validate(self):
check_min_cppstd(self, 11)
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
def package(self):
copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses"))
copy(self, "*.hpp", os.path.join(self.source_folder, "include"), os.path.join(self.package_folder, "include"))
def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []

View File

@ -0,0 +1,7 @@
cmake_minimum_required(VERSION 3.15)
project(PackageTest CXX)
find_package(hfsm2 REQUIRED CONFIG)
add_executable(example example.cpp)
target_link_libraries(example PRIVATE hfsm2::hfsm2)

View File

@ -0,0 +1,26 @@
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake
import os
class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain"
test_type = "explicit"
def requirements(self):
self.requires(self.tested_reference_str)
def layout(self):
cmake_layout(self)
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def test(self):
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindir, "example")
self.run(bin_path, env="conanrun")

View File

@ -0,0 +1,20 @@
#include <cstdlib>
#include <iostream>
#include <hfsm2/machine.hpp>
struct Context{};
using Config = hfsm2::Config::ContextT<Context&>;
using M = hfsm2::MachineT<Config>;
using FSM = M::PeerRoot<struct State>;
struct State : FSM::State {};
int main(void) {
Context context;
FSM::Instance machine{context};
machine.update();
std::cout << "[HFSM2] Test package passed with success." << std::endl;
return EXIT_SUCCESS;
}

3
recipes/hfsm2/config.yml Normal file
View File

@ -0,0 +1,3 @@
versions:
"2.5.2":
folder: all

View File

@ -1,58 +1,22 @@
sources:
"1.91.8":
url: "https://github.com/ocornut/imgui/archive/v1.91.8.tar.gz"
sha256: "db3a2e02bfd6c269adf0968950573053d002f40bdfb9ef2e4a90bce804b0f286"
"1.91.8-docking":
url: "https://github.com/ocornut/imgui/archive/v1.91.8-docking.tar.gz"
sha256: "55f5e65abea635f2a8bfa9a92cd966448a363a262cf6dead7cc662fb0ab37612"
"1.91.5":
url: "https://github.com/ocornut/imgui/archive/v1.91.5.tar.gz"
sha256: "2aa2d169c569368439e5d5667e0796d09ca5cc6432965ce082e516937d7db254"
"1.91.5-docking":
url: "https://github.com/ocornut/imgui/archive/v1.91.5-docking.tar.gz"
sha256: "f66c5d1b28fed044bd8dffa3882b4d1b29b2dbd1167fabe3d9d2219081e81cd8"
"1.91.4":
url: "https://github.com/ocornut/imgui/archive/v1.91.4.tar.gz"
sha256: "a455c28d987c78ddf56aab98ce0ff0fda791a23a2ec88ade46dd106b837f0923"
"1.91.4-docking":
url: "https://github.com/ocornut/imgui/archive/v1.91.4-docking.tar.gz"
sha256: "7405bdaf304b77d6d03e6d17d1f31ca3586fa0c65a466fa1dd71b6ca6a222023"
"1.91.3":
url: "https://github.com/ocornut/imgui/archive/v1.91.3.tar.gz"
sha256: "29949d7b300c30565fbcd66398100235b63aa373acfee0b76853a7aeacd1be28"
"1.91.3-docking":
url: "https://github.com/ocornut/imgui/archive/v1.91.3-docking.tar.gz"
sha256: "d462ccd0ca10cb412f8946c09ebd4cd0f62ca5def544dec5b3ce293c59f089fb"
"1.91.2":
url: "https://github.com/ocornut/imgui/archive/v1.91.2.tar.gz"
sha256: "a3c4fd857a0a48f6edad3e25de68fa1e96d2437f1665039714d1de9ad579b8d0"
"1.91.2-docking":
url: "https://github.com/ocornut/imgui/archive/v1.91.2-docking.tar.gz"
sha256: "bd6e9e6dc0451060152cea2a610256969c77a360659f4bd3836d6d4c9267229b"
"1.91.0":
url: "https://github.com/ocornut/imgui/archive/v1.91.0.tar.gz"
sha256: "6e62c87252e6b3725ba478a1c04dc604aa0aaeec78fedcf4011f1e52548f4cc9"
"1.91.0-docking":
url: "https://github.com/ocornut/imgui/archive/v1.91.0-docking.tar.gz"
sha256: "b08a569eedcf2bf25e763e034754fdbe37dfcb035072310781c92fa6e6504bf7"
"1.90.9":
url: "https://github.com/ocornut/imgui/archive/v1.90.9.tar.gz"
sha256: "04943919721e874ac75a2f45e6eb6c0224395034667bf508923388afda5a50bf"
"1.90.9-docking":
url: "https://github.com/ocornut/imgui/archive/v1.90.9-docking.tar.gz"
sha256: "48e7e4e4f154ad98d0946126a84e2375f849f6a67792129a805817dd60a34330"
"1.90.8":
url: "https://github.com/ocornut/imgui/archive/v1.90.8.tar.gz"
sha256: "f606b4fb406aa0f8dad36d4a9dd3d6f0fd39f5f0693e7468abc02d545fb505ae"
"1.90.8-docking":
url: "https://github.com/ocornut/imgui/archive/v1.90.8-docking.tar.gz"
sha256: "51845ed8b8e81490288c3c8165173d47e9bcf92f7d999aea800635f95587b9e7"
"1.90.7":
url: "https://github.com/ocornut/imgui/archive/v1.90.7.tar.gz"
sha256: "872574217643d4ad7e9e6df420bb8d9e0d468fb90641c2bf50fd61745e05de99"
"1.90.7-docking":
url: "https://github.com/ocornut/imgui/archive/v1.90.7-docking.tar.gz"
sha256: "582a9061a508b82b0ff6504aa17af6bb449bca9edf0a0f0f33bf729252cd3194"
"1.90.6":
url: "https://github.com/ocornut/imgui/archive/v1.90.6.tar.gz"
sha256: "70b4b05ac0938e82b4d5b8d59480d3e2ca63ca570dfb88c55023831f387237ad"
"1.90.6-docking":
url: "https://github.com/ocornut/imgui/archive/v1.90.6-docking.tar.gz"
sha256: "fc7f81d009ef718917aee0ac3ea1c74c8a5cfc8016049ad153b4d91d302b8aef"
"1.90.5":
url: "https://github.com/ocornut/imgui/archive/v1.90.5.tar.gz"
sha256: "e94b48dba7311c85ba8e3e6fe7c734d76a0eed21b2b42c5180fd5706d1562241"

View File

@ -1,40 +1,16 @@
versions:
"1.91.8":
folder: all
"1.91.8-docking":
folder: all
"1.91.5":
folder: all
"1.91.5-docking":
folder: all
"1.91.4":
folder: all
"1.91.4-docking":
folder: all
"1.91.3":
folder: all
"1.91.3-docking":
folder: all
"1.91.2":
folder: all
"1.91.2-docking":
folder: all
"1.91.0":
folder: all
"1.91.0-docking":
folder: all
"1.90.9":
folder: all
"1.90.9-docking":
folder: all
"1.90.8":
folder: all
"1.90.8-docking":
folder: all
"1.90.7":
folder: all
"1.90.7-docking":
folder: all
"1.90.6":
folder: all
"1.90.6-docking":
folder: all
"1.90.5":
folder: all
"1.90.5-docking":

View File

@ -90,6 +90,19 @@ class JoltPhysicsConan(ConanFile):
self.cpp_info.defines.extend(["JPH_USE_AVX2", "JPH_USE_AVX", "JPH_USE_SSE4_1",
"JPH_USE_SSE4_2", "JPH_USE_LZCNT", "JPH_USE_TZCNT",
"JPH_USE_F16C", "JPH_USE_FMADD"])
if is_msvc(self):
# INFO: Floating point exceptions are enabled by default
# https://github.com/jrouwe/JoltPhysics/blob/v5.2.0/Build/CMakeLists.txt#L37
# https://github.com/jrouwe/JoltPhysics/blob/v5.2.0/Jolt/Jolt.cmake#L529
self.cpp_info.defines.append("JPH_FLOATING_POINT_EXCEPTIONS_ENABLED")
if self.options.shared:
# https://github.com/jrouwe/JoltPhysics/blob/v5.2.0/Jolt/Jolt.cmake#L495
self.cpp_info.defines.append("JPH_SHARED_LIBRARY")
# https://github.com/jrouwe/JoltPhysics/blob/v5.2.0/Build/CMakeLists.txt#L48
# https://github.com/jrouwe/JoltPhysics/blob/v5.2.0/Jolt/Jolt.cmake#L554
self.cpp_info.defines.append("JPH_OBJECT_LAYER_BITS=16")
if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.system_libs.append("pthread")

View File

@ -1,8 +1,12 @@
#include <cstdlib>
#include <Jolt/Jolt.h>
#include <Jolt/Core/Factory.h>
#include <Jolt/RegisterTypes.h>
int main() {
JPH::RegisterDefaultAllocator();
auto factory = JPH::Factory();
JPH::UnregisterTypes();
return EXIT_SUCCESS;
}

View File

@ -1,4 +1,7 @@
sources:
"1.0.0":
url: "https://github.com/QuTech-Delft/libqasm/releases/download/1.0.0/libqasm-1.0.0.tar.gz"
sha256: "22968e2892194e69ca3cea9f4655c2f51470aae60d9e7dbd662136eb4088c984"
"0.6.9":
url: "https://github.com/QuTech-Delft/libqasm/releases/download/0.6.9/libqasm-0.6.9.tar.gz"
sha256: "23c5d0e4e506e1974668408f8018034d1b1303e65c6d2d28639eae9499759c4d"

View File

@ -1,4 +1,6 @@
versions:
"1.0.0":
folder: all
"0.6.9":
folder: all
"0.6.8":

View File

@ -1,4 +1,10 @@
sources:
"2022.0.0":
url: "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2022.0.0.tar.gz"
sha256: "e8e89c9c345415b17b30a2db3095ba9d47647611662073f7fbf54ad48b7f3c2a"
"2021.13.0":
url: "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.13.0.tar.gz"
sha256: "3ad5dd08954b39d113dc5b3f8a8dc6dc1fd5250032b7c491eb07aed5c94133e1"
"2021.12.0":
url: "https://github.com/oneapi-src/oneTBB/archive/refs/tags/v2021.12.0.tar.gz"
sha256: "c7bb7aa69c254d91b8f0041a71c5bcc3936acb64408a1719aec0b2b7639dd84f"
@ -21,6 +27,11 @@ sources:
url: "https://github.com/oneapi-src/oneTBB/archive/v2021.3.0.tar.gz"
sha256: "8f616561603695bbb83871875d2c6051ea28f8187dbe59299961369904d1d49e"
patches:
"2022.0.0":
- patch_description: "Fix flow_graph tests build when compiling with GCC 13.3 or older"
patch_type: "official"
patch_source: "https://github.com/uxlfoundation/oneTBB/commit/9c9ace26863cf50853f39b2d0b78146d20a981a6"
patch_file: "patches/onetbb-wait-namespace.patch"
"2021.8.0":
- patch_description: "fix building for android with NDK >= 25"
patch_type: "portability"

View File

@ -30,12 +30,14 @@ class OneTBBConan(ConanFile):
"tbbproxy": [True, False],
"tbbbind": [True, False],
"interprocedural_optimization": [True, False],
"build_apple_frameworks": [True, False],
}
default_options = {
"tbbmalloc": True,
"tbbproxy": True,
"tbbbind": True,
"interprocedural_optimization": True,
"build_apple_frameworks": False,
}
@property
@ -57,6 +59,13 @@ class OneTBBConan(ConanFile):
return self.settings.os == "Macos" and Version(self.version) >= "2021.11.0"
return True
@property
def _tbb_apple_frameworks_supported(self):
if is_apple_os(self):
# if the version is 2021.13.0 or later, the build_apple_frameworks option is supported on macOS
return Version(self.version) >= "2021.13.0"
return False
@property
def _tbbbind_build(self):
return self.options.get_safe("tbbbind", False) and self._tbbbind_supported
@ -79,6 +88,8 @@ class OneTBBConan(ConanFile):
del self.options.tbbbind
if Version(self.version) < "2021.6.0" or self.settings.os == "Android":
del self.options.interprocedural_optimization
if not self._tbb_apple_frameworks_supported:
del self.options.build_apple_frameworks
def configure(self):
if Version(self.version) >= "2021.6.0" and not self.options.tbbmalloc:
@ -133,6 +144,8 @@ class OneTBBConan(ConanFile):
if self.settings.os == "Windows":
toolchain.variables[f"CMAKE_HWLOC_{self._tbbbind_hwloc_version}_DLL_PATH"] = \
os.path.join(hwloc_package_folder, "bin", "hwloc.dll").replace("\\", "/")
if self.options.get_safe("build_apple_frameworks"):
toolchain.variables["TBB_BUILD_APPLE_FRAMEWORKS"] = True
toolchain.generate()
if self._tbbbind_build and not self._tbbbind_explicit_hwloc:
@ -168,7 +181,11 @@ class OneTBBConan(ConanFile):
tbb = self.cpp_info.components["libtbb"]
tbb.set_property("cmake_target_name", "TBB::tbb")
tbb.libs = [lib_name("tbb")]
if self.options.get_safe("build_apple_frameworks"):
tbb.frameworkdirs.append(os.path.join(self.package_folder, "lib"))
tbb.frameworks.append("tbb")
else:
tbb.libs = [lib_name("tbb")]
if self.settings.os == "Windows":
version_info = load(self,
os.path.join(self.package_folder, "include", "oneapi", "tbb",
@ -189,7 +206,13 @@ class OneTBBConan(ConanFile):
tbbmalloc = self.cpp_info.components["tbbmalloc"]
tbbmalloc.set_property("cmake_target_name", "TBB::tbbmalloc")
tbbmalloc.libs = [lib_name("tbbmalloc")]
if self.options.get_safe("build_apple_frameworks"):
tbbmalloc.frameworkdirs.append(os.path.join(self.package_folder, "lib"))
tbbmalloc.frameworks.append("tbbmalloc")
else:
tbbmalloc.libs = [lib_name("tbbmalloc")]
if self.settings.os in ["Linux", "FreeBSD"]:
tbbmalloc.system_libs = ["dl", "pthread"]
@ -198,7 +221,13 @@ class OneTBBConan(ConanFile):
tbbproxy = self.cpp_info.components["tbbmalloc_proxy"]
tbbproxy.set_property("cmake_target_name", "TBB::tbbmalloc_proxy")
tbbproxy.libs = [lib_name("tbbmalloc_proxy")]
if self.options.get_safe("build_apple_frameworks"):
tbbproxy.frameworkdirs.append(os.path.join(self.package_folder, "lib"))
tbbproxy.frameworks.append("tbbmalloc_proxy")
else:
tbbproxy.libs = [lib_name("tbbmalloc_proxy")]
tbbproxy.requires = ["tbbmalloc"]
if self.settings.os in ["Linux", "FreeBSD"]:
tbbproxy.system_libs = ["m", "dl", "pthread"]

View File

@ -0,0 +1,38 @@
From 9c9ace26863cf50853f39b2d0b78146d20a981a6 Mon Sep 17 00:00:00 2001
From: Ilya Isaev <ilya.isaev@intel.com>
Date: Fri, 1 Nov 2024 10:52:18 +0100
Subject: [PATCH] Fix flow_graph tests build when compiling with GCC 13.3
(#1543)
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
---
include/oneapi/tbb/detail/_flow_graph_impl.h | 2 +-
include/oneapi/tbb/flow_graph.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/oneapi/tbb/detail/_flow_graph_impl.h b/include/oneapi/tbb/detail/_flow_graph_impl.h
index 19e00a8ef1..55063b93e1 100644
--- a/include/oneapi/tbb/detail/_flow_graph_impl.h
+++ b/include/oneapi/tbb/detail/_flow_graph_impl.h
@@ -347,7 +347,7 @@ class graph : no_copy, public graph_proxy {
caught_exception = false;
try_call([this] {
my_task_arena->execute([this] {
- wait(my_wait_context_vertex.get_context(), *my_context);
+ d1::wait(my_wait_context_vertex.get_context(), *my_context);
});
cancelled = my_context->is_group_execution_cancelled();
}).on_exception([this] {
diff --git a/include/oneapi/tbb/flow_graph.h b/include/oneapi/tbb/flow_graph.h
index 20916fa7c2..5b438faabf 100644
--- a/include/oneapi/tbb/flow_graph.h
+++ b/include/oneapi/tbb/flow_graph.h
@@ -305,7 +305,7 @@ class receiver {
bool res = internal_try_put(t, message_metainfo{message_metainfo::waiters_type{&msg_wait_vertex}});
if (res) {
__TBB_ASSERT(graph_reference().my_context != nullptr, "No wait_context associated with the Flow Graph");
- wait(msg_wait_vertex.get_context(), *graph_reference().my_context);
+ d1::wait(msg_wait_vertex.get_context(), *graph_reference().my_context);
}
return res;
}

View File

@ -1,39 +1,8 @@
#include "tbb/task_group.h"
#include "tbb/flow_graph.h"
#include <tbb/tbb.h>
#include <iostream>
using namespace tbb;
using namespace tbb::flow;
int Fib(int n) {
if( n<2 ) {
return n;
} else {
int x, y;
task_group g;
g.run([&]{x=Fib(n-1);}); // spawn a task
g.run([&]{y=Fib(n-2);}); // spawn another task
g.wait(); // wait for both tasks to complete
return x+y;
}
}
int main(){
std::cout<<"Fib 6="<<Fib(6)<<"\n";
graph g;
continue_node< continue_msg> hello( g,
[]( const continue_msg &) {
std::cout << "Hello";
}
);
continue_node< continue_msg> world( g,
[]( const continue_msg &) {
std::cout << " World\n";
}
);
make_edge(hello, world);
hello.try_put(continue_msg());
g.wait_for_all();
std::cout << "tbb runtime version: " << TBB_runtime_version() << "\n";
std::cout << "tbb runtime interface version: " << TBB_runtime_interface_version() << "\n";
return 0;
}

View File

@ -1,8 +0,0 @@
cmake_minimum_required(VERSION 3.15)
project(test_package)
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package
${CMAKE_CURRENT_BINARY_DIR}/test_package)

View File

@ -1,17 +0,0 @@
from conans import ConanFile, CMake, tools
import os
class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "cmake", "cmake_find_package_multi"
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def test(self):
if not tools.cross_building(self):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)

View File

@ -1,4 +1,8 @@
versions:
"2022.0.0":
folder: all
"2021.13.0":
folder: all
"2021.12.0":
folder: all
"2021.10.0":

View File

@ -0,0 +1,4 @@
sources:
"0.1":
url: "https://github.com/cmuparlay/parlayhash/archive/refs/tags/v0.1.tar.gz"
sha256: "63dd2680de0291c8c4440fc3364490de0ee3cdea94b02b7449900bac18d66f2f"

View File

@ -0,0 +1,60 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.files import get, copy
from conan.tools.build import check_min_cppstd, check_max_cppstd
from conan.tools.layout import basic_layout
from conan.tools.scm import Version
import os
required_conan_version = ">=2.1"
class ParlayHashConan(ConanFile):
name = "parlayhash"
description = "A Header-Only Scalable Concurrent Hash Map."
license = "MIT"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/cmuparlay/parlayhash"
topics = ("unordered_map", "hashmap", "header-only")
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True
def layout(self):
basic_layout(self, src_folder="src")
def package_id(self):
self.info.clear()
def validate(self):
check_min_cppstd(self, 17)
if self.settings.compiler in ["apple-clang", "clang"]:
if Version(self.settings.compiler.version) < "15":
# error: reference to local binding 'tag' declared in enclosing function 'parlay::parlay_hash::Find'
raise ConanInvalidConfiguration(f"Can't be used with {self.settings.compiler} < 15, lacks proper C++17 support")
else:
# error: no type named 'result_of' in namespace 'std'
check_max_cppstd(self, 17)
if self.settings.compiler == "msvc":
# error C3861: '__builtin_prefetch': identifier not found
raise ConanInvalidConfiguration("Can't be used with msvc")
def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
def build(self):
pass
def package(self):
copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, pattern="*.h", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include"), excludes=[".#hash_table.h"])
def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.system_libs.append("pthread")
# This one is a best-effort guess, as the library is header-only it does not mention a target explicitly
self.cpp_info.set_property("cmake_file_name", "parlayhash")
self.cpp_info.set_property("cmake_target_name", "parlay")

View File

@ -0,0 +1,9 @@
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES CXX)
find_package(parlayhash REQUIRED CONFIG)
add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE parlay)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17)

View File

@ -0,0 +1,26 @@
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake
import os
class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
test_type = "explicit"
def requirements(self):
self.requires(self.tested_reference_str)
def layout(self):
cmake_layout(self)
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def test(self):
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
self.run(bin_path, env="conanrun")

Some files were not shown because too many files have changed in this diff Show More