diff --git a/recipes/openblas/all/conandata.yml b/recipes/openblas/all/conandata.yml index 85e4fee5631f1..74a69a147b022 100644 --- a/recipes/openblas/all/conandata.yml +++ b/recipes/openblas/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.3.28": + url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.28.tar.gz" + sha256: "f1003466ad074e9b0c8d421a204121100b0751c96fc6fcf3d1456bd12f8a00a1" "0.3.27": url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.27.tar.gz" sha256: "aa2d68b1564fe2b13bc292672608e9cdeeeb6dc34995512e65c3b10f4599e897" @@ -14,18 +17,3 @@ sources: "0.3.20": url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.20.tar.gz" sha256: "8495c9affc536253648e942908e88e097f2ec7753ede55aca52e5dead3029e3c" - "0.3.17": - url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.17.tar.gz" - sha256: "df2934fa33d04fd84d839ca698280df55c690c86a5a1133b3f7266fce1de279f" - "0.3.15": - url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.15.tar.gz" - sha256: "30a99dec977594b387a17f49904523e6bc8dd88bd247266e83485803759e4bbe" - "0.3.13": - url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.13.tar.gz" - sha256: "79197543b17cc314b7e43f7a33148c308b0807cd6381ee77f77e15acf3e6459e" - "0.3.12": - url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.12.tar.gz" - sha256: "65a7d3a4010a4e3bd5c0baa41a234797cd3a1735449a4a5902129152601dc57b" - "0.3.10": - url: "https://github.com/xianyi/OpenBLAS/archive/v0.3.10.tar.gz" - sha256: "0484d275f87e9b8641ff2eecaa9df2830cbe276ac79ad80494822721de6e1693" diff --git a/recipes/openblas/all/conanfile.py b/recipes/openblas/all/conanfile.py index 6fcc5d83048b9..de3605b3e524e 100644 --- a/recipes/openblas/all/conanfile.py +++ b/recipes/openblas/all/conanfile.py @@ -3,11 +3,10 @@ from conan.tools.apple import fix_apple_shared_install_name from conan.tools.build import cross_building from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools.files import copy, get, replace_in_file, rmdir +from conan.tools.files import copy, get, rmdir from conan.tools.microsoft import is_msvc_static_runtime, is_msvc from conan.tools.scm import Version import os -import textwrap required_conan_version = ">=1.53.0" @@ -108,11 +107,6 @@ def _fortran_compiler(self): def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - # When no Fortran compiler is available, OpenBLAS builds LAPACK from an f2c-converted copy of LAPACK unless the NO_LAPACK option is specified. - # This is not available before v0.3.21. - if Version(self.version) < "0.3.21": - self.options.build_lapack = False - self.options.build_relapack = False def configure(self): if self.options.shared: @@ -164,14 +158,10 @@ def generate(self): tc.variables["BUILD_TESTING"] = False tc.variables["NOFORTRAN"] = not self.options.build_lapack - # This checks explicit user-specified fortran compiler if self.options.build_lapack and not self._fortran_compiler: - if Version(self.version) < "0.3.21": - self.output.warning("Building with LAPACK support requires a Fortran compiler.") - else: - tc.variables["C_LAPACK"] = True - tc.variables["NOFORTRAN"] = True - self.output.info("Building LAPACK without a Fortran compiler") + tc.variables["C_LAPACK"] = True + tc.variables["NOFORTRAN"] = True + self.output.info("Building LAPACK without a Fortran compiler") tc.variables["BUILD_WITHOUT_LAPACK"] = not self.options.build_lapack tc.variables["BUILD_RELAPACK"] = self.options.build_relapack @@ -190,46 +180,14 @@ def generate(self): tc.cache_variables["TARGET"] = self.options.target tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" - tc.generate() - def _patch_sources(self): - if Version(self.version) <= "0.3.15": - replace_in_file(self, os.path.join(self.source_folder, "cmake", "utils.cmake"), - "set(obj_defines ${defines_in})", textwrap.dedent("""\ - set(obj_defines ${defines_in}) + # Fix a fatal compiler warning on GCC 14 + # https://github.com/OpenMathLib/OpenBLAS/pull/4894 + tc.extra_cflags.append("-Wno-error=incompatible-pointer-types") - list(FIND obj_defines "RC" def_idx) - if (${def_idx} GREATER -1) - list(REMOVE_ITEM obj_defines "RC") - list(APPEND obj_defines "RC=RC") - endif () - list(FIND obj_defines "CR" def_idx) - if (${def_idx} GREATER -1) - list(REMOVE_ITEM obj_defines "CR") - list(APPEND obj_defines "CR=CR") - endif ()""")) - if Version(self.version) < "0.3.21": - f_check_cmake = os.path.join(self.source_folder, "cmake", "f_check.cmake") - if Version(self.version) >= "0.3.12": - replace_in_file(self, f_check_cmake, - 'message(STATUS "No Fortran compiler found, can build only BLAS but not LAPACK")', - 'message(FATAL_ERROR "No Fortran compiler found. Cannot build with LAPACK.")') - else: - replace_in_file(self, f_check_cmake, - "enable_language(Fortran)", - textwrap.dedent("""\ - include(CheckLanguage) - check_language(Fortran) - if(CMAKE_Fortran_COMPILER) - enable_language(Fortran) - else() - message(FATAL_ERROR "No Fortran compiler found. Cannot build with LAPACK.") - set (NOFORTRAN 1) - set (NO_LAPACK 1) - endif()""")) + tc.generate() def build(self): - self._patch_sources() cmake = CMake(self) cmake.configure() cmake.build() diff --git a/recipes/openblas/all/test_package/CMakeLists.txt b/recipes/openblas/all/test_package/CMakeLists.txt index eaf07820c3b1c..fed4c938681b1 100644 --- a/recipes/openblas/all/test_package/CMakeLists.txt +++ b/recipes/openblas/all/test_package/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package) find_package(OpenBLAS REQUIRED CONFIG) diff --git a/recipes/openblas/all/test_package/conanfile.py b/recipes/openblas/all/test_package/conanfile.py index 02eb5ce439fb4..f789a1a96acfa 100644 --- a/recipes/openblas/all/test_package/conanfile.py +++ b/recipes/openblas/all/test_package/conanfile.py @@ -4,11 +4,9 @@ import os -# It will become the standard on Conan 2.x class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" - test_type = "explicit" + generators = "CMakeDeps", "CMakeToolchain" def requirements(self): self.requires(self.tested_reference_str) diff --git a/recipes/openblas/config.yml b/recipes/openblas/config.yml index e0f3014a9fdda..a9986f1c97c73 100644 --- a/recipes/openblas/config.yml +++ b/recipes/openblas/config.yml @@ -1,4 +1,6 @@ versions: + "0.3.28": + folder: all "0.3.27": folder: all "0.3.26": @@ -9,13 +11,3 @@ versions: folder: all "0.3.20": folder: all - "0.3.17": - folder: all - "0.3.15": - folder: all - "0.3.13": - folder: all - "0.3.12": - folder: all - "0.3.10": - folder: all