From c593d7aaa24e56439dc5f262e7bac47795c29b75 Mon Sep 17 00:00:00 2001 From: keef-cognitiv <34460527+keef-cognitiv@users.noreply.github.com> Date: Thu, 21 Nov 2024 12:22:48 -0800 Subject: [PATCH] [rxcpp/4.1.1] Add patches required for building on gcc 14 (#25886) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Abril Rincón Blanco --- recipes/rxcpp/all/conanfile.py | 10 +++++++++- .../rxcpp/all/test_v1_package/CMakeLists.txt | 11 ----------- recipes/rxcpp/all/test_v1_package/conanfile.py | 17 ----------------- 3 files changed, 9 insertions(+), 29 deletions(-) delete mode 100644 recipes/rxcpp/all/test_v1_package/CMakeLists.txt delete mode 100644 recipes/rxcpp/all/test_v1_package/conanfile.py diff --git a/recipes/rxcpp/all/conanfile.py b/recipes/rxcpp/all/conanfile.py index d05961ecfc442..61160297e88db 100644 --- a/recipes/rxcpp/all/conanfile.py +++ b/recipes/rxcpp/all/conanfile.py @@ -1,9 +1,11 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.files import copy, get from conan.tools.layout import basic_layout +from conan.tools.scm import Version import os -required_conan_version = ">=1.50.0" +required_conan_version = ">=2.1" class RxcppConan(ConanFile): @@ -14,6 +16,7 @@ class RxcppConan(ConanFile): homepage = "https://github.com/ReactiveX/RxCpp" url = "https://github.com/conan-io/conan-center-index" settings = "os", "arch", "compiler", "build_type" + package_type = "header-library" no_copy_source = True def package_id(self): @@ -21,6 +24,11 @@ def package_id(self): def layout(self): basic_layout(self, src_folder="src") + + def validate_build(self): + if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) >= "14": + raise ConanInvalidConfiguration("This package can't be built for gcc >= 14. " + "You can compile it with a lower version and consume it later with your compiler.") def source(self): get(self, **self.conan_data["sources"][self.version], diff --git a/recipes/rxcpp/all/test_v1_package/CMakeLists.txt b/recipes/rxcpp/all/test_v1_package/CMakeLists.txt deleted file mode 100644 index f776bf6153687..0000000000000 --- a/recipes/rxcpp/all/test_v1_package/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(rxcpp REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE rxcpp::rxcpp) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/rxcpp/all/test_v1_package/conanfile.py b/recipes/rxcpp/all/test_v1_package/conanfile.py deleted file mode 100644 index 38f4483872d47..0000000000000 --- a/recipes/rxcpp/all/test_v1_package/conanfile.py +++ /dev/null @@ -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)