Skip to content

Commit

Permalink
Merge branch 'conan-io:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandrePTJ authored Jan 30, 2024
2 parents 575a1fb + 66fadf9 commit d6ef1d1
Show file tree
Hide file tree
Showing 58 changed files with 436 additions and 139 deletions.
3 changes: 3 additions & 0 deletions .c3i/authorized_users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1275,3 +1275,6 @@ authorized_users:
- anthonyliot
- obnyis
- johningve
- stefansli
- wgtmac
- kevinAlbs
6 changes: 6 additions & 0 deletions .c3i/conan_v2_ready_references.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ required_for_references:
- cppdap
- cppfront
- cppitertools
- cppkafka
- cpprestsdk
- cpptoml
- cpptrace
Expand Down Expand Up @@ -379,6 +380,7 @@ required_for_references:
- flex
- flint
- fltk
- flux
- fmi1
- fmi2
- fmi3
Expand Down Expand Up @@ -1042,6 +1044,7 @@ required_for_references:
- picojson
- picosha2
- pipes
- pistache
- pixman
- pkgconf
- platform.converters
Expand Down Expand Up @@ -1165,6 +1168,7 @@ required_for_references:
- safeint
- sail
- samurai
- sassc
- sbepp
- sbp
- scdoc
Expand Down Expand Up @@ -1237,6 +1241,7 @@ required_for_references:
- sqlpp11
- sqlpp11-connector-sqlite3
- squirrel
- srt
- ssht
- ssp
- st_tree
Expand Down Expand Up @@ -1349,6 +1354,7 @@ required_for_references:
- tsl-sparse-map
- tuplet
- turtle
- tweenerspp
- tweetnacl
- twitch-native-ipc
- twitchtv-libsoundtrackutil
Expand Down
1 change: 1 addition & 0 deletions .c3i/config_v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ tasks:
automatic_merge:
reviews_required_total: 2 # Reviews that a PR needs so it can be merged
reviews_required_team: 1 # Reviews from the Conan team that a PR needs so it can be merged
reviews_required_bump: 1 # Total reviews required for a bump PR to be merged
branches: # PRs from automations that have these as base-branches will be merged automatically
- "conan-io:action-doc-toc"
# Requirements to merge a given pull-request:
Expand Down
1 change: 1 addition & 0 deletions .c3i/config_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ tasks:
automatic_merge:
reviews_required_total: 1000 # AutomaticMerge shouldn't run with this file, but just in case
reviews_required_team: 1000 # AutomaticMerge shouldn't run with this file, but just in case
reviews_required_bump: 1000 # AutomaticMerge shouldn't run with this file, but just in case
access_request:
request_issue_url: https://github.com/conan-io/conan-center-index/issues/4
max_inactivity_days: 0
Expand Down
9 changes: 9 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

### 24-January-2024 - 12:13 CET

- [feature] Update Conan 1.x branch to version 1.62.0
- [feature] Update Conan 2.x branch to version 2.0.16
- [feature] Require review from maintainers for Bump version and Bump requirements
- [fix] Show header-only option in the build CI summary table
- [fix] Use build/host profile conf also in test package
- [fix] Use only string to handle Github labels

### 05-December-2023 - 16:23 CET

- [fix] Use the correct profile to test a tool_require.
Expand Down
5 changes: 2 additions & 3 deletions docs/review_process.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,8 @@ At least 2 approving reviews are required, and at least one of them has to be fr
So, it might be 1 official + 1 community, or 2 official, but it couldn't be just 2 community reviews.
Approvals are only counted if they are associated with the latest commit in the PR, while "Change requested" ones (from the Conan team) will persist even if there are new commits. Don't hesitate to dismiss old reviews if the issues have already been addressed.

> **Note** Pull requests labelled as [`Bump version`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+version%22)
> or [`Bump dependencies`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+dependencies%22+) are merged by
> the bot without requiring any approval.
Pull requests labelled as [`Bump version`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+version%22)
or [`Bump dependencies`](https://github.com/conan-io/conan-center-index/pulls?q=is%3Aopen+is%3Apr+label%3A%22Bump+dependencies%22+) require **just 1 approving review from an official reviewer**. Community reviewers are not required but are still welcome.

### Reviews from others

Expand Down
3 changes: 3 additions & 0 deletions recipes/bshoshany-thread-pool/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"4.0.1":
sha256: "34d25503e17e58198613d9306313f8358cfaaa9320f2b7694dc599b90a1858a7"
url: "https://github.com/bshoshany/thread-pool/archive/refs/tags/v4.0.1.tar.gz"
"3.5.0":
sha256: "d3efd5c434f6e99f4cff7b8219cbb586dc06bc0aeaf17cd174813a2333961306"
url: "https://github.com/bshoshany/thread-pool/archive/refs/tags/v3.5.0.tar.gz"
Expand Down
53 changes: 6 additions & 47 deletions recipes/bshoshany-thread-pool/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -1,59 +1,18 @@
#include "BS_thread_pool.hpp"

BS::synced_stream sync_out;
BS::thread_pool pool;

std::condition_variable ID_cv, total_cv;
std::mutex ID_mutex, total_mutex;
BS::concurrency_t count_unique_threads()
{
const BS::concurrency_t num_tasks = pool.get_thread_count() * 2;
std::vector<std::thread::id> thread_IDs(num_tasks);
std::unique_lock<std::mutex> total_lock(total_mutex);
BS::concurrency_t total_count = 0;
bool ID_release = false;
pool.wait_for_tasks();
for (std::thread::id& id : thread_IDs)
pool.push_task(
[&total_count, &id, &ID_release]
{
id = std::this_thread::get_id();
{
const std::scoped_lock total_lock_local(total_mutex);
++total_count;
}
total_cv.notify_one();
std::unique_lock<std::mutex> ID_lock_local(ID_mutex);
ID_cv.wait(ID_lock_local, [&ID_release] { return ID_release; });
});
total_cv.wait(total_lock, [&total_count] { return total_count == pool.get_thread_count(); });
{
const std::scoped_lock ID_lock(ID_mutex);
ID_release = true;
}
ID_cv.notify_all();
total_cv.wait(total_lock, [&total_count, &num_tasks] { return total_count == num_tasks; });
pool.wait_for_tasks();
std::sort(thread_IDs.begin(), thread_IDs.end());
return static_cast<BS::concurrency_t>(std::unique(thread_IDs.begin(), thread_IDs.end()) - thread_IDs.begin());
}
#include <iostream>

int main()
{
const char* line = "------------------------------------------";
sync_out.println(line);
sync_out.println("Testing thread pool...");
BS::concurrency_t unique_threads = count_unique_threads();
if (pool.get_thread_count() == unique_threads)
BS::thread_pool pool;
std::cout << "Testing thread pool...\n";
if (pool.get_thread_count() == std::thread::hardware_concurrency())
{
sync_out.println("SUCCESS: Created ", unique_threads, " unique threads!");
sync_out.println(line);
std::cout << "SUCCESS: Created " << pool.get_thread_count() << " unique threads!\n";
return EXIT_SUCCESS;
}
else
{
sync_out.println("ERROR: Failed to create ", unique_threads, " unique threads!");
sync_out.println(line);
std::cout << "ERROR: Failed to create " << pool.get_thread_count() << " unique threads!\n";
return EXIT_FAILURE;
}
}
2 changes: 2 additions & 0 deletions recipes/bshoshany-thread-pool/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"4.0.1":
folder: all
"3.5.0":
folder: all
"3.4.0":
Expand Down
7 changes: 7 additions & 0 deletions recipes/c-blosc2/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"2.13.0":
url: "https://github.com/Blosc/c-blosc2/archive/v2.13.0.tar.gz"
sha256: "d886798ff0a63948a4076f2ed60f0dc18be3aa1299ac1aff2cf705419cbe1bea"
"2.12.0":
url: "https://github.com/Blosc/c-blosc2/archive/v2.12.0.tar.gz"
sha256: "b8fa07ab0627c19fb652e08a5ada197eb0939b75e97e2fb76bbee145eaedc6e9"
Expand Down Expand Up @@ -33,6 +36,10 @@ sources:
url: "https://github.com/Blosc/c-blosc2/archive/v2.4.3.tar.gz"
sha256: "d4aa5e0794598794f20ab950e973d44f0d0d9c133ea1a5a07cb200fa54d2e036"
patches:
"2.13.0":
- patch_file: "patches/2.11.1-0001-fix-cmake.patch"
patch_description: "use cci package"
patch_type: "conan"
"2.12.0":
- patch_file: "patches/2.11.1-0001-fix-cmake.patch"
patch_description: "use cci package"
Expand Down
2 changes: 2 additions & 0 deletions recipes/c-blosc2/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"2.13.0":
folder: all
"2.12.0":
folder: all
"2.11.3":
Expand Down
3 changes: 3 additions & 0 deletions recipes/circularbuffer/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"1.4.0":
url: "https://github.com/rlogiacco/CircularBuffer/archive/refs/tags/1.4.0.tar.gz"
sha256: "e01a837d2fe46fea168e8d36e1a4225d9414a855484d55b5a240f239ab53fc0a"
"1.3.3":
url: "https://github.com/rlogiacco/CircularBuffer/archive/refs/tags/1.3.3.tar.gz"
sha256: "d558029c9ab5012a8bbf9a89bd130eb320bdeb69e3f8bd96851ddc1e5dc24eba"
4 changes: 2 additions & 2 deletions recipes/circularbuffer/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
class CircularBufferConan(ConanFile):
name = "circularbuffer"
description = "Arduino circular buffer library"
topics = ("circular buffer", "arduino", "data-structures")
license = "LGPL-3.0"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/rlogiacco/CircularBuffer"
topics = ("circular buffer", "arduino", "data-structures", "header-only")
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True
Expand All @@ -29,7 +29,7 @@ def source(self):

def package(self):
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
copy(self, "CircularBuffer.h",
copy(self, "CircularBuffer.h*",
dst=os.path.join(self.package_folder, "include"), src=self.source_folder)
copy(self, "CircularBuffer.tpp",
dst=os.path.join(self.package_folder, "include"), src=self.source_folder)
Expand Down
4 changes: 4 additions & 0 deletions recipes/circularbuffer/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,7 @@ find_package(circularbuffer CONFIG REQUIRED)
add_executable(${PROJECT_NAME} test_package.cpp)
target_link_libraries(${PROJECT_NAME} PRIVATE circularbuffer::circularbuffer)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)

if(circularbuffer_VERSION VERSION_GREATER_EQUAL "1.4.0")
target_compile_definitions(${PROJECT_NAME} PRIVATE CIRCULARBUFFER_1_4_0_LATER)
endif()
4 changes: 4 additions & 0 deletions recipes/circularbuffer/all/test_package/test_package.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#ifdef CIRCULARBUFFER_1_4_0_LATER
#include <CircularBuffer.hpp>
#else
#include <CircularBuffer.h>
#endif

int main() {
CircularBuffer<int, 256> buffer;
Expand Down
2 changes: 2 additions & 0 deletions recipes/circularbuffer/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"1.4.0":
folder: all
"1.3.3":
folder: all
12 changes: 9 additions & 3 deletions recipes/cppkafka/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
sources:
"0.4.1":
url: "https://github.com/mfontanini/cppkafka/archive/refs/tags/v0.4.1.tar.gz"
sha256: "45770ae0404cb9ba73d659618c51cd55b574c66ed3c7b148360222fb524b0ff7"
"0.4.0":
url: "https://github.com/mfontanini/cppkafka/archive/refs/tags/0.4.0.tar.gz"
sha256: "f4f05eb7a180a856663b02ec0b777283275ef88e5523f3013fd51c6c4ab63b5a"
patches:
"0.4.1":
- patch_file: "patches/0.4.0-0001-no-template-export.patch"
- patch_file: "patches/0.4.1-0003-clean-rpath.patch"
"0.4.0":
- patch_file: "patches/0001-no-template-export.patch"
- patch_file: "patches/0002-cppstd.patch"
- patch_file: "patches/0003-clean-rpath.patch"
- patch_file: "patches/0.4.0-0001-no-template-export.patch"
- patch_file: "patches/0.4.0-0002-cppstd.patch"
- patch_file: "patches/0.4.0-0003-clean-rpath.patch"
12 changes: 6 additions & 6 deletions recipes/cppkafka/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir
from conan.tools.scm import Version
import os

required_conan_version = ">=1.53.0"
Expand All @@ -10,11 +11,10 @@
class CppKafkaConan(ConanFile):
name = "cppkafka"
description = "Modern C++ Apache Kafka client library (wrapper for librdkafka)"
topics = ("librdkafka", "kafka")
license = "MIT"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/mfontanini/cppkafka"
license = "MIT"

topics = ("librdkafka", "kafka")
package_type = "library"
settings = "os", "arch", "compiler", "build_type"
options = {
Expand All @@ -41,8 +41,8 @@ def layout(self):
cmake_layout(self, src_folder="src")

def requirements(self):
self.requires("boost/1.81.0")
self.requires("librdkafka/2.0.2")
self.requires("boost/1.83.0", transitive_headers=True)
self.requires("librdkafka/2.3.0", transitive_headers=True)

def validate(self):
if self.settings.compiler.get_safe("cppstd"):
Expand All @@ -57,7 +57,7 @@ def generate(self):
tc.variables["CPPKAFKA_DISABLE_TESTS"] = True
tc.variables["CPPKAFKA_DISABLE_EXAMPLES"] = True
tc.variables["CPPKAFKA_RDKAFKA_STATIC_LIB"] = False # underlying logic is useless
if self.settings.os == "Windows":
if Version(self.version) < "0.4.1" and self.settings.os == "Windows":
tc.preprocessor_definitions["NOMINMAX"] = 1
tc.generate()
cd = CMakeDeps(self)
Expand Down
28 changes: 28 additions & 0 deletions recipes/cppkafka/all/patches/0.4.1-0003-clean-rpath.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c667df..46c5590 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@ if (NOT CMAKE_CXX_FLAGS)
add_definitions("-DNOGDI=1")
add_definitions("-DNOMINMAX=1")
else()
- set(CMAKE_CXX_FLAGS "-Wall")
+# set(CMAKE_CXX_FLAGS "-Wall")
endif()
endif()

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 214ccd4..d2667ce 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -46,8 +46,8 @@ set_target_properties(${TARGET_NAME} PROPERTIES
ARCHIVE_OUTPUT_NAME "${TARGET_NAME}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_INSTALL_LIBDIR}"
LIBRARY_OUTPUT_NAME "${TARGET_NAME}"
- INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}"
- INSTALL_RPATH_USE_LINK_PATH TRUE
+ # INSTALL_RPATH "${CMAKE_INSTALL_LIBDIR}"
+ # INSTALL_RPATH_USE_LINK_PATH TRUE
VERSION ${CPPKAFKA_VERSION}
SOVERSION ${CPPKAFKA_VERSION})
# In CMake >= 3.15 Boost::boost == Boost::headers
2 changes: 2 additions & 0 deletions recipes/cppkafka/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"0.4.1":
folder: "all"
"0.4.0":
folder: "all"
14 changes: 10 additions & 4 deletions recipes/fftw/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,9 @@ def on_off(value):
cmake.configure(variables=variables)
cmake.build()

# Potentially avoid side effects due to build_folder property tweak.
self._current_precision = None

def package(self):
copy(self, "COPYRIGHT", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
for self._current_precision in self._all_precisions:
Expand All @@ -125,6 +128,9 @@ def package(self):
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))

# Potentially avoid side effects due to build_folder property tweak.
self._current_precision = None

def package_info(self):
cmake_config_name = cmake_namespace = "FFTW3"

Expand All @@ -136,10 +142,10 @@ def package_info(self):
self.cpp_info.names["cmake_find_package"] = cmake_namespace
self.cpp_info.names["cmake_find_package_multi"] = cmake_namespace

for self._current_precision in self._all_precisions:
prec_suffix = self._prec_suffix[self._current_precision]
for precision in self._all_precisions:
prec_suffix = self._prec_suffix[precision]
cmake_target_name = pkgconfig_name = lib_name = "fftw3" + prec_suffix
component_name = f"fftwlib_{self._current_precision}"
component_name = f"fftwlib_{precision}"
component = self.cpp_info.components[component_name]

# TODO: back to global scope in conan v2 once cmake_find_package_* & pkg_config generators removed
Expand All @@ -150,7 +156,7 @@ def package_info(self):
self.cpp_info.components[component_name].libs.append(lib_name)
if self.settings.os in ["Linux", "FreeBSD"]:
component.system_libs.append("m")
if self._current_precision == QUAD:
if precision == QUAD:
component.system_libs.extend(['quadmath'])
if self.options.threads:
component.system_libs.append("pthread")
Expand Down
Loading

0 comments on commit d6ef1d1

Please sign in to comment.