diff --git a/docs/package_templates/header_only/all/conanfile.py b/docs/package_templates/header_only/all/conanfile.py index 51ea9a72fb9541..6414c6f49c028f 100644 --- a/docs/package_templates/header_only/all/conanfile.py +++ b/docs/package_templates/header_only/all/conanfile.py @@ -36,7 +36,7 @@ def _min_cppstd(self): def _compilers_minimum_version(self): return { "Visual Studio": "15", - "msvc": "14.1", + "msvc": "191", "gcc": "5", "clang": "5", "apple-clang": "5.1", diff --git a/recipes/cgal/all/conanfile.py b/recipes/cgal/all/conanfile.py index 3a63d4857c1679..2d4d74dba1bec9 100644 --- a/recipes/cgal/all/conanfile.py +++ b/recipes/cgal/all/conanfile.py @@ -163,6 +163,10 @@ def _create_cmake_module_variables(self, module_file): endfunction() CGAL_setup_CGAL_flags(CGAL::CGAL) + +# CGAL use may rely on the presence of those two variables +set(CGAL_USE_GMP TRUE CACHE INTERNAL "CGAL library is configured to use GMP") +set(CGAL_USE_MPFR TRUE CACHE INTERNAL "CGAL library is configured to use MPFR") ''') save(self, module_file, content) diff --git a/recipes/cmake/binary/conandata.yml b/recipes/cmake/binary/conandata.yml index afcf32ce814612..3eb4a53d2fff43 100644 --- a/recipes/cmake/binary/conandata.yml +++ b/recipes/cmake/binary/conandata.yml @@ -1,4 +1,23 @@ sources: + "3.27.5": + Linux: + armv8: + url: "https://cmake.org/files/v3.27/cmake-3.27.5-linux-aarch64.tar.gz" + sha256: "2ffaf176d0f93c332abaffbf3ce82fc8c90e49e0fcee8dc16338bcfbb150ead7" + x86_64: + url: "https://cmake.org/files/v3.27/cmake-3.27.5-linux-x86_64.tar.gz" + sha256: "138c68addae825b16ed78d792dafef5e0960194833f48bd77e7e0429c6bc081c" + Macos: + universal: + url: "https://cmake.org/files/v3.27/cmake-3.27.5-macos10.10-universal.tar.gz" + sha256: "1f776640e6ad35b2b3fe2ab5e39cff363b2c3034ecb56e45597402b7bf010e47" + Windows: + armv8: + url: "https://cmake.org/files/v3.27/cmake-3.27.5-windows-arm64.zip" + sha256: "3fcc84d34e3213b0e4261295eaddfc645685ab366dc570421555e7f3d3080d3a" + x86_64: + url: "https://cmake.org/files/v3.27/cmake-3.27.5-windows-x86_64.zip" + sha256: "1e8e06c8ecf63d5f213019e1cd39ea41a6cf952db5f2c8e69b8e47f5bc302684" "3.27.4": Linux: armv8: diff --git a/recipes/cmake/config.yml b/recipes/cmake/config.yml index 94869f2ceea826..179f7ccf1c5b2c 100644 --- a/recipes/cmake/config.yml +++ b/recipes/cmake/config.yml @@ -1,4 +1,6 @@ versions: + "3.27.5": + folder: "binary" "3.27.4": folder: "binary" "3.27.1": diff --git a/recipes/cminpack/all/conanfile.py b/recipes/cminpack/all/conanfile.py index a1da35f69dd6af..e6918dedc922aa 100644 --- a/recipes/cminpack/all/conanfile.py +++ b/recipes/cminpack/all/conanfile.py @@ -1,9 +1,9 @@ -from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout -from conan.tools import files from conan import ConanFile +from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout +from conan.tools.files import copy, get, rmdir import os -required_conan_version = ">=1.45.0" +required_conan_version = ">=1.54.0" class CMinpackConan(ConanFile): @@ -14,7 +14,7 @@ class CMinpackConan(ConanFile): topics = ("nonlinear", "solver") homepage = "http://devernay.free.fr/hacks/cminpack/" license = "LicenseRef-CopyrightMINPACK.txt" - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -25,40 +25,27 @@ class CMinpackConan(ConanFile): "fPIC": True, } - def generate(self): - tc = CMakeToolchain(self) - tc.variables["BUILD_EXAMPLES"] = "OFF" - tc.variables["CMINPACK_LIB_INSTALL_DIR"] = "lib" - tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0077"] = "NEW" - tc.generate() - - def layout(self): - cmake_layout(self) - def config_options(self): if self.settings.os == "Windows": del self.options.fPIC def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass - - # cminpack is a c library - try: - del self.settings.compiler.libcxx - except Exception: - pass - try: - del self.settings.compiler.cppstd - except Exception: - pass + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") + + def layout(self): + cmake_layout(self, src_folder="src") def source(self): - files.get(self, **self.conan_data["sources"][self.version], - strip_root=True, destination=self.source_folder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def generate(self): + tc = CMakeToolchain(self) + tc.variables["BUILD_EXAMPLES"] = "OFF" + tc.variables["CMINPACK_LIB_INSTALL_DIR"] = "lib" + tc.generate() def build(self): cmake = CMake(self) @@ -66,12 +53,11 @@ def build(self): cmake.build() def package(self): + copy(self, "CopyrightMINPACK.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) cmake = CMake(self) cmake.install() - - files.rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) - files.copy(self, "CopyrightMINPACK.txt", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) - files.rmdir(self, os.path.join(self.package_folder, "share")) # contains cmake config files + rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig")) + rmdir(self, os.path.join(self.package_folder, "share")) # contains cmake config files def _library_postfix(self): postfix = "" @@ -92,7 +78,7 @@ def package_info(self): self.cpp_info.components["cminpack-double"].names["cmake_find_package"] = "cminpack" self.cpp_info.components["cminpack-double"].names["cmake_find_package_multi"] = "cminpack" self.cpp_info.components["cminpack-double"].names["pkg_config"] = "cminpack" - + # the single precision version self.cpp_info.components['cminpack-single'].libs = ['cminpacks' + self._library_postfix()] self.cpp_info.components['cminpack-single'].includedirs.append(minpack_include_dir) @@ -102,7 +88,6 @@ def package_info(self): self.cpp_info.components["cminpack-single"].names["cmake_find_package_multi"] = "cminpacks" self.cpp_info.components["cminpack-single"].names["pkg_config"] = "cminpacks" - if self.settings.os != "Windows": self.cpp_info.components['cminpack-double'].system_libs.append("m") self.cpp_info.components['cminpack-single'].system_libs.append("m") diff --git a/recipes/cminpack/all/test_package/CMakeLists.txt b/recipes/cminpack/all/test_package/CMakeLists.txt index fa33c20512fe46..cc33b8b3543efd 100644 --- a/recipes/cminpack/all/test_package/CMakeLists.txt +++ b/recipes/cminpack/all/test_package/CMakeLists.txt @@ -1,7 +1,7 @@ -cmake_minimum_required(VERSION 3.12) -project(CMinPack-Conan-TestPackage C) +cmake_minimum_required(VERSION 3.1) +project(test_package LANGUAGES C) -find_package(CMinpack REQUIRED) +find_package(CMinpack REQUIRED CONFIG) # This builds one of the original cminpack examples against # both types of the library diff --git a/recipes/cminpack/all/test_package/conanfile.py b/recipes/cminpack/all/test_package/conanfile.py index db7d5f7ac5bc33..434bb3861fb76b 100644 --- a/recipes/cminpack/all/test_package/conanfile.py +++ b/recipes/cminpack/all/test_package/conanfile.py @@ -1,17 +1,20 @@ - from conan import ConanFile -from conan.tools.cmake import CMake, cmake_layout from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout import os class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + test_type = "explicit" def layout(self): cmake_layout(self) + def requirements(self): + self.requires(self.tested_reference_str) + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/cminpack/all/test_v1_package/CMakeLists.txt b/recipes/cminpack/all/test_v1_package/CMakeLists.txt index 124290cb0ab4b9..0d20897301b68b 100644 --- a/recipes/cminpack/all/test_v1_package/CMakeLists.txt +++ b/recipes/cminpack/all/test_v1_package/CMakeLists.txt @@ -1,16 +1,8 @@ -cmake_minimum_required(VERSION 3.1.2) -project(CMinPack-ConanV1-TestPackage C) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(CMinpack REQUIRED CONFIG) - -# This builds one of the original cminpack examples against -# both types of the library - -add_executable(cminpack_test_double ../test_package/tchkderc.c) -target_link_libraries(cminpack_test_double PRIVATE cminpack::cminpack) - -add_executable(cminpack_test_float ../test_package/tchkderc.c) -target_link_libraries(cminpack_test_float PRIVATE cminpack::cminpacks) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/continuable/all/conandata.yml b/recipes/continuable/all/conandata.yml index 13887549bde390..15db65fb152edd 100644 --- a/recipes/continuable/all/conandata.yml +++ b/recipes/continuable/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "4.2.2": + url: "https://github.com/Naios/continuable/archive/4.2.2.tar.gz" + sha256: "49bf82a349b26c01194631e4fe5d1dbad080b3b4a347eebc5cf95326ea130fba" "4.2.1": url: "https://github.com/Naios/continuable/archive/4.2.1.tar.gz" sha256: "19c7c2371c94ec759eac8169dea593703b54057551322b5d682643548c9c0146" @@ -6,5 +9,5 @@ sources: url: "https://github.com/Naios/continuable/archive/4.2.0.tar.gz" sha256: "d85bed930ac19d4b36b23778ad9ae943c2981f7492982bd51dadb89e8908d53f" "4.1.0": - sha256: "CBCF50B1B73D8B4EB54734C827D6736CD038960E13F80699958DBB87F1827650" url: "https://github.com/Naios/continuable/archive/4.1.0.tar.gz" + sha256: "CBCF50B1B73D8B4EB54734C827D6736CD038960E13F80699958DBB87F1827650" diff --git a/recipes/continuable/all/conanfile.py b/recipes/continuable/all/conanfile.py index 40af36527241ef..e724022beb95f0 100644 --- a/recipes/continuable/all/conanfile.py +++ b/recipes/continuable/all/conanfile.py @@ -78,7 +78,7 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("function2/4.1.0") + self.requires("function2/4.2.3") def package_id(self): self.info.clear() diff --git a/recipes/continuable/all/test_package/CMakeLists.txt b/recipes/continuable/all/test_package/CMakeLists.txt index f98eae0c75bf8e..9a7b7e199f5b87 100644 --- a/recipes/continuable/all/test_package/CMakeLists.txt +++ b/recipes/continuable/all/test_package/CMakeLists.txt @@ -5,7 +5,7 @@ find_package(continuable REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) set_target_properties(${PROJECT_NAME} PROPERTIES - CXX_STANDARD 14 CXX_STANDARD_REQUIRED ON ) target_link_libraries(${PROJECT_NAME} PRIVATE continuable::continuable) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) diff --git a/recipes/continuable/config.yml b/recipes/continuable/config.yml index 52fa67bcd41e8a..955cd0773fc58e 100644 --- a/recipes/continuable/config.yml +++ b/recipes/continuable/config.yml @@ -1,4 +1,6 @@ versions: + "4.2.2": + folder: all "4.2.1": folder: all "4.2.0": diff --git a/recipes/cpu_features/all/conandata.yml b/recipes/cpu_features/all/conandata.yml index 8e0a68b98fb045..b0a209ae1c3e88 100644 --- a/recipes/cpu_features/all/conandata.yml +++ b/recipes/cpu_features/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.9.0": + url: "https://github.com/google/cpu_features/archive/refs/tags/v0.9.0.tar.gz" + sha256: "bdb3484de8297c49b59955c3b22dba834401bc2df984ef5cfc17acbe69c5018e" "0.8.0": url: "https://github.com/google/cpu_features/archive/refs/tags/v0.8.0.tar.gz" sha256: "7021729f2db97aa34f218d12727314f23e8b11eaa2d5a907e8426bcb41d7eaac" diff --git a/recipes/cpu_features/config.yml b/recipes/cpu_features/config.yml index a4fbe67cb54a0d..7f1513eea2fa95 100644 --- a/recipes/cpu_features/config.yml +++ b/recipes/cpu_features/config.yml @@ -1,4 +1,6 @@ versions: + "0.9.0": + folder: "all" "0.8.0": folder: "all" "0.7.0": diff --git a/recipes/crc_cpp/all/conandata.yml b/recipes/crc_cpp/all/conandata.yml index 09ada265a56575..ae324a0321c623 100644 --- a/recipes/crc_cpp/all/conandata.yml +++ b/recipes/crc_cpp/all/conandata.yml @@ -1,13 +1,13 @@ sources: - "1.0.0": - url: "https://github.com/AshleyRoll/crc_cpp/archive/refs/tags/v1.0.0.tar.gz" - sha256: "035ed616e0662eddbe7db7c920faaef99bbeb8953ebf98c3bb76cb81a2c4de2b" - "1.0.1": - url: "https://github.com/AshleyRoll/crc_cpp/archive/refs/tags/v1.0.1.tar.gz" - sha256: "865a0e110bf7e94061ceef1683947a7788b54f932c7ce3848edc89d36e1aea26" - "1.1.0": - url: "https://github.com/AshleyRoll/crc_cpp/archive/refs/tags/v1.1.0.tar.gz" - sha256: "50e46e3c44eb39809f6697b253f7b36c089642d7b7f2ebe2f75adf23c50676be" "1.2.0": url: "https://github.com/AshleyRoll/crc_cpp/archive/refs/tags/v1.2.0.tar.gz" sha256: "508a609d9ef12c3088ed17a8ed820c965161a36dd90738c7358333fbfbe96af5" + "1.1.0": + url: "https://github.com/AshleyRoll/crc_cpp/archive/refs/tags/v1.1.0.tar.gz" + sha256: "50e46e3c44eb39809f6697b253f7b36c089642d7b7f2ebe2f75adf23c50676be" + "1.0.1": + url: "https://github.com/AshleyRoll/crc_cpp/archive/refs/tags/v1.0.1.tar.gz" + sha256: "865a0e110bf7e94061ceef1683947a7788b54f932c7ce3848edc89d36e1aea26" + "1.0.0": + url: "https://github.com/AshleyRoll/crc_cpp/archive/refs/tags/v1.0.0.tar.gz" + sha256: "035ed616e0662eddbe7db7c920faaef99bbeb8953ebf98c3bb76cb81a2c4de2b" diff --git a/recipes/crc_cpp/all/conanfile.py b/recipes/crc_cpp/all/conanfile.py index 4ccb993ef97a21..c77936e91ebeab 100644 --- a/recipes/crc_cpp/all/conanfile.py +++ b/recipes/crc_cpp/all/conanfile.py @@ -1,6 +1,9 @@ -from conan import ConanFile, tools -from conan.tools.scm import Version +from conan import ConanFile from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +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" @@ -9,45 +12,51 @@ class Crc_CppConan(ConanFile): name = "crc_cpp" description = "A header only constexpr / compile time small-table based CRC library for C++17 and newer" - topics = "crc_cpp", "crc", "constexpr", "cpp17", "cpp20", "header-only" - settings = "compiler", "os" + topics = ("crc", "constexpr", "cpp17", "cpp20", "header-only") url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/AshleyRoll/crc_cpp" license = "MIT" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return "17" @property - def _supported_compiler(self): - compiler = str(self.settings.compiler) - version = Version(self.settings.compiler.version) - if compiler == "Visual Studio" and version >= "15": - return True - elif compiler == "gcc" and version >= "9": - return True - elif compiler == "clang" and version >= "5": - return True - elif compiler == "apple-clang" and version >= "10": - return True - else: - self.output.warn("{} recipe lacks information about the {} compiler standard version support".format(self.name, compiler)) - return False + def _compilers_minimum_version(self): + return { + "gcc": "9", + "clang": "5", + "apple-clang": "10", + "Visual Studio": "15", + "msvc": "191", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.build.check_min_cppstd(self, "17") - if not self._supported_compiler: - raise ConanInvalidConfiguration("crc_cpp: Unsupported compiler: {}-{} " - "Minimum C++17 constexpr features required.".format(self.settings.compiler, self.settings.compiler.version)) + check_min_cppstd(self, self._min_cppstd) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + def source(self): - tools.files.get(self, **self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder) - self.copy(pattern="*", dst="include", src=os.path.join(self._source_subfolder, "include")) + copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) + copy(self, "*", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include")) - def package_id(self): - self.info.header_only() + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/crc_cpp/all/test_package/CMakeLists.txt b/recipes/crc_cpp/all/test_package/CMakeLists.txt index d41bc6dd30265f..ba67401c34bccb 100644 --- a/recipes/crc_cpp/all/test_package/CMakeLists.txt +++ b/recipes/crc_cpp/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ cmake_minimum_required(VERSION 3.8) project(test_package LANGUAGES CXX) -set(CMAKE_CXX_STANDARD 17) -set(CMAKE_CXX_STANDARD_REQUIRED ON) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup() +find_package(crc_cpp REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -target_link_libraries(${PROJECT_NAME} ${CONAN_LIBS}) +target_link_libraries(${PROJECT_NAME} PRIVATE crc_cpp::crc_cpp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/crc_cpp/all/test_package/conanfile.py b/recipes/crc_cpp/all/test_package/conanfile.py index 34a0bcae95438f..0a6bc68712d901 100644 --- a/recipes/crc_cpp/all/test_package/conanfile.py +++ b/recipes/crc_cpp/all/test_package/conanfile.py @@ -1,11 +1,19 @@ -from conan import ConanFile, tools -from conans import CMake +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import CMake, cmake_layout import os class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake" + settings = "os", "arch", "compiler", "build_type" + generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" + test_type = "explicit" + + def layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) def build(self): cmake = CMake(self) @@ -13,6 +21,6 @@ def build(self): cmake.build() def test(self): - if not tools.build.cross_building(self): - bin_path = os.path.join("bin", "test_package") - self.run(bin_path, run_environment=True) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/crc_cpp/all/test_v1_package/CMakeLists.txt b/recipes/crc_cpp/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..0d20897301b68b --- /dev/null +++ b/recipes/crc_cpp/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.1) +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) diff --git a/recipes/crc_cpp/all/test_v1_package/conanfile.py b/recipes/crc_cpp/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..38f4483872d47f --- /dev/null +++ b/recipes/crc_cpp/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +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) diff --git a/recipes/crc_cpp/config.yml b/recipes/crc_cpp/config.yml index 0d463a277e7325..de59a653e157c9 100644 --- a/recipes/crc_cpp/config.yml +++ b/recipes/crc_cpp/config.yml @@ -1,9 +1,9 @@ versions: - "1.0.0": - folder: "all" - "1.0.1": + "1.2.0": folder: "all" "1.1.0": folder: "all" - "1.2.0": + "1.0.1": + folder: "all" + "1.0.0": folder: "all" diff --git a/recipes/crowcpp-crow/all/conanfile.py b/recipes/crowcpp-crow/all/conanfile.py index 001767af2d0fdb..baeed2070acd2d 100644 --- a/recipes/crowcpp-crow/all/conanfile.py +++ b/recipes/crowcpp-crow/all/conanfile.py @@ -42,12 +42,12 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("boost/1.81.0") + self.requires("boost/1.83.0") if self.version == "0.2": - self.requires("openssl/1.1.1s") + self.requires("openssl/[>=1.1 <4]") if Version(self.version) >= "1.0": if self.options.with_ssl: - self.requires("openssl/1.1.1s") + self.requires("openssl/[>=1.1 <3]") if self.options.with_compression: self.requires("zlib/1.2.13") @@ -121,10 +121,13 @@ def package_info(self): self.cpp_info.set_property("cmake_file_name", "Crow") self.cpp_info.set_property("cmake_target_name", "Crow::Crow") + if Version(self.version) == "0.2": + self.cpp_info.requires.append("openssl::ssl") + if Version(self.version) >= "1.0": if self.options.with_ssl: self.cpp_info.defines.append("CROW_ENABLE_SSL") - self.cpp_info.requires.append("OpenSSL::ssl") + self.cpp_info.requires.append("openssl::ssl") if self.options.with_compression: self.cpp_info.defines.append("CROW_ENABLE_COMPRESSION") self.cpp_info.requires.append("zlib::zlib") diff --git a/recipes/crowcpp-crow/all/test_package/conanfile.py b/recipes/crowcpp-crow/all/test_package/conanfile.py index 3022a3897300e8..6fce18aff0519b 100644 --- a/recipes/crowcpp-crow/all/test_package/conanfile.py +++ b/recipes/crowcpp-crow/all/test_package/conanfile.py @@ -6,7 +6,7 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" - generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv" + generators = "CMakeDeps", "VirtualRunEnv" test_type = "explicit" def requirements(self): diff --git a/recipes/cryptopp/all/conandata.yml b/recipes/cryptopp/all/conandata.yml index 2bc29cced3bfe2..8b52a60c80d57e 100644 --- a/recipes/cryptopp/all/conandata.yml +++ b/recipes/cryptopp/all/conandata.yml @@ -1,4 +1,11 @@ sources: + "8.8.0": + source: + url: "https://github.com/weidai11/cryptopp/archive/CRYPTOPP_8_8_0.tar.gz" + sha256: "f8b8f632533b279ee297694e651e9204824bba6022ce66e60ebebb08b551fe7a" + cmake: + url: "https://github.com/abdes/cryptopp-cmake/archive/CRYPTOPP_8_8_0.tar.gz" + sha256: "a10068ab47fb46785dfe43ebe45369008855b03f6711ac7d1af6f45aa9238290" "8.7.0": source: url: "https://github.com/weidai11/cryptopp/archive/CRYPTOPP_8_7_0.tar.gz" diff --git a/recipes/cryptopp/all/conanfile.py b/recipes/cryptopp/all/conanfile.py index f16bdf4f4f23d6..d61c97a23b4e49 100644 --- a/recipes/cryptopp/all/conanfile.py +++ b/recipes/cryptopp/all/conanfile.py @@ -97,6 +97,7 @@ def generate(self): tc.cache_variables["CRYPTOPP_USE_INTERMEDIATE_OBJECTS_TARGET"] = False if self.settings.os == "Android": tc.cache_variables["CRYPTOPP_NATIVE_ARCH"] = True + tc.cache_variables["CMAKE_DISABLE_FIND_PACKAGE_Git"] = True tc.generate() def _patch_sources(self): diff --git a/recipes/cryptopp/config.yml b/recipes/cryptopp/config.yml index 0cf6dab66b6c74..58c17b09dbebf5 100644 --- a/recipes/cryptopp/config.yml +++ b/recipes/cryptopp/config.yml @@ -1,4 +1,6 @@ versions: + "8.8.0": + folder: "all" "8.7.0": folder: "all" "8.6.0": diff --git a/recipes/ctpg/all/conandata.yml b/recipes/ctpg/all/conandata.yml index e352628a7b1dd7..35ba92c0e04759 100644 --- a/recipes/ctpg/all/conandata.yml +++ b/recipes/ctpg/all/conandata.yml @@ -2,9 +2,3 @@ sources: "1.3.7": url: "https://github.com/peter-winter/ctpg/archive/refs/tags/v1.3.7.tar.gz" sha256: "6cc7c34de4983e21070599fd5693b65ef08cd5c8f42612e43b47eda723623429" - "1.3.6": - url: "https://github.com/peter-winter/ctpg/archive/refs/tags/v1.3.6.tar.gz" - sha256: "8ad5e06ab551fe30ff10faf6b53b85c862a873e3827505d5f5b63aae2b836ba2" - "1.3.5": - url: "https://github.com/peter-winter/ctpg/archive/refs/tags/v1.3.5.tar.gz" - sha256: "6874e71aecace33a07dd202c5c6c53277653d54daa13b460f4e1eb5b0c902d42" diff --git a/recipes/ctpg/all/conanfile.py b/recipes/ctpg/all/conanfile.py index bd69eefe8c5a2e..6e511a34160b52 100644 --- a/recipes/ctpg/all/conanfile.py +++ b/recipes/ctpg/all/conanfile.py @@ -1,59 +1,73 @@ -from conans.errors import ConanInvalidConfiguration -from conans import ConanFile, tools import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" + class CTPGConan(ConanFile): name = "ctpg" - license = "MIT" description = ( "Compile Time Parser Generator is a C++ single header library which takes a language description as a C++ code " "and turns it into a LR1 table parser with a deterministic finite automaton lexical analyzer, all in compile time." ) - topics = ("regex", "parser", "grammar", "compile-time") + license = "MIT" url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/peter-winter/ctpg" - settings = "compiler", + topics = ("regex", "parser", "grammar", "compile-time", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True - _compiler_required_cpp17 = { - "Visual Studio": "16", - "gcc": "8", - "clang": "12", - "apple-clang": "12.0", - } + @property + def _min_cppstd(self): + return 17 @property - def _source_subfolder(self): - return "source_subfolder" + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "12", + "apple-clang": "12.0", + "msvc": "192", + "Visual Studio": "16", + } - def validate(self): - ## TODO: In ctpg<=1.3.5, Visual Studio C++ failed to compile ctpg with "error MSB6006: "CL.exe" exited with code -1073741571." - if self.settings.compiler == "Visual Studio": - raise ConanInvalidConfiguration("{} does not support Visual Studio currently.".format(self.name)) + def layout(self): + basic_layout(self, src_folder="src") - if self.settings.get_safe("compiler.cppstd"): - tools.check_min_cppstd(self, "17") + def package_id(self): + self.info.clear() - minimum_version = self._compiler_required_cpp17.get(str(self.settings.compiler), False) - if minimum_version: - if tools.Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("{} requires C++17, which your compiler does not support.".format(self.name)) - else: - self.output.warn("{} requires C++17. Your compiler is unknown. Assuming it supports C++17.".format(self.name)) + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) - def package_id(self): - self.info.header_only() + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("LICENSE*", "licenses", self._source_subfolder) - if tools.Version(self.version) >= "1.3.7": - self.copy("ctpg.hpp", - os.path.join("include", "ctpg"), - os.path.join(self._source_subfolder, "include", "ctpg")) - else: - self.copy("ctpg.hpp", "include", os.path.join(self._source_subfolder, "include")) + copy(self, "LICENSE*", + dst=os.path.join(self.package_folder, "licenses"), + src=self.source_folder) + include_dir = os.path.join("include", "ctpg") + copy(self, "ctpg.hpp", + dst=os.path.join(self.package_folder, include_dir), + src=os.path.join(self.source_folder, include_dir)) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/ctpg/all/test_package/CMakeLists.txt b/recipes/ctpg/all/test_package/CMakeLists.txt index b09bb90b2f88d4..72fdf15fd58d71 100644 --- a/recipes/ctpg/all/test_package/CMakeLists.txt +++ b/recipes/ctpg/all/test_package/CMakeLists.txt @@ -1,17 +1,11 @@ -cmake_minimum_required(VERSION 3.1) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(ctpg CONFIG REQUIRED) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} ctpg::ctpg) set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 17) -if(CTPG_PLACED_CPTG_FOLDER) - target_compile_definitions(${PROJECT_NAME} PUBLIC CTPG_PLACED_CPTG_FOLDER) -endif() if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") target_compile_options(${PROJECT_NAME} PUBLIC -constexpr:depth3000000) diff --git a/recipes/ctpg/all/test_package/conanfile.py b/recipes/ctpg/all/test_package/conanfile.py index 34c01340114eff..c5591f2deebdb2 100644 --- a/recipes/ctpg/all/test_package/conanfile.py +++ b/recipes/ctpg/all/test_package/conanfile.py @@ -1,18 +1,32 @@ +from conan import ConanFile +from conan.tools.build import can_run +from conan.tools.cmake import cmake_layout, CMake, CMakeToolchain, CMakeDeps +from conan.tools.scm import Version import os -from conans import ConanFile, CMake, tools class TestPackageConan(ConanFile): - settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + settings = "os", "arch", "compiler", "build_type" + test_type = "explicit" + + def requirements(self): + self.requires(self.tested_reference_str) + + def layout(self): + cmake_layout(self) + + def generate(self): + tc = CMakeToolchain(self) + tc.generate() + tc = CMakeDeps(self) + tc.generate() def build(self): cmake = CMake(self) - cmake.definitions["CTPG_PLACED_CPTG_FOLDER"] = tools.Version(self.deps_cpp_info["ctpg"].version) >= "1.3.7" 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) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/ctpg/all/test_package/test_package.cpp b/recipes/ctpg/all/test_package/test_package.cpp index bcd377f23cbd81..0d99b97395ccd2 100644 --- a/recipes/ctpg/all/test_package/test_package.cpp +++ b/recipes/ctpg/all/test_package/test_package.cpp @@ -1,8 +1,4 @@ -#ifdef CTPG_PLACED_CPTG_FOLDER -# include "ctpg/ctpg.hpp" -#else -# include "ctpg.hpp" -#endif +#include "ctpg/ctpg.hpp" #include <iostream> @@ -28,7 +24,7 @@ constexpr ctpg::parser p( ) ); -int main(int argc, char* argv[]) { +int main() { auto res = p.parse(ctpg::buffers::string_buffer("10, 20, 30"), std::cerr); bool success = res.has_value(); if (success) diff --git a/recipes/ctpg/all/test_v1_package/CMakeLists.txt b/recipes/ctpg/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/ctpg/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +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/) diff --git a/recipes/ctpg/all/test_v1_package/conanfile.py b/recipes/ctpg/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..90eb89e3f2f46b --- /dev/null +++ b/recipes/ctpg/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +import os +from conans import ConanFile, CMake, tools + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + 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) diff --git a/recipes/ctpg/config.yml b/recipes/ctpg/config.yml index 3da45bc7782505..fba76735a90139 100644 --- a/recipes/ctpg/config.yml +++ b/recipes/ctpg/config.yml @@ -1,7 +1,3 @@ versions: "1.3.7": folder: all - "1.3.6": - folder: all - "1.3.5": - folder: all diff --git a/recipes/elfio/all/conandata.yml b/recipes/elfio/all/conandata.yml index f57351ff19434e..fec8473460a71e 100644 --- a/recipes/elfio/all/conandata.yml +++ b/recipes/elfio/all/conandata.yml @@ -1,13 +1,16 @@ sources: + "3.12": + url: "https://github.com/serge1/ELFIO/releases/download/Release_3.12/elfio-3.12.tar.gz" + sha256: "caf49f3bf55a9c99c98ebea4b05c79281875783802e892729eea0415505f68c4" "3.11": - sha256: 3307b104c205399786edbba203906de9517e36297709fe747faf9478d55fbb91 - url: https://github.com/serge1/ELFIO/releases/download/Release_3.11/elfio-3.11.tar.gz + url: "https://github.com/serge1/ELFIO/releases/download/Release_3.11/elfio-3.11.tar.gz" + sha256: "3307b104c205399786edbba203906de9517e36297709fe747faf9478d55fbb91" "3.10": - sha256: cdc6362ede2e0c8d1d6db15d7da4b526f461d9cfae6f6337369e416a8bc60234 - url: https://github.com/serge1/ELFIO/releases/download/Release_3.10/elfio-3.10.tar.gz + url: "https://github.com/serge1/ELFIO/releases/download/Release_3.10/elfio-3.10.tar.gz" + sha256: "cdc6362ede2e0c8d1d6db15d7da4b526f461d9cfae6f6337369e416a8bc60234" "3.9": - sha256: 767b269063fc35aba6d361139f830aa91c45dc6b77942f082666876c1aa0be0f - url: https://github.com/serge1/ELFIO/releases/download/Release_3.9/elfio-3.9.tar.gz + url: "https://github.com/serge1/ELFIO/releases/download/Release_3.9/elfio-3.9.tar.gz" + sha256: "767b269063fc35aba6d361139f830aa91c45dc6b77942f082666876c1aa0be0f" "3.8": - sha256: 9553ce2b8d8aa2fb43f0e9be9bcbd10cd52f40b385110ea54173889c982f9ac4 - url: https://github.com/serge1/ELFIO/releases/download/Release_3.8/elfio-3.8.tar.gz + url: "https://github.com/serge1/ELFIO/releases/download/Release_3.8/elfio-3.8.tar.gz" + sha256: "9553ce2b8d8aa2fb43f0e9be9bcbd10cd52f40b385110ea54173889c982f9ac4" diff --git a/recipes/elfio/all/conanfile.py b/recipes/elfio/all/conanfile.py index eef05956d72825..db0b0c7ba0af5e 100644 --- a/recipes/elfio/all/conanfile.py +++ b/recipes/elfio/all/conanfile.py @@ -1,4 +1,5 @@ from conan import ConanFile +from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout @@ -10,15 +11,37 @@ class ElfioConan(ConanFile): name = "elfio" - url = "https://github.com/conan-io/conan-center-index" - homepage = "http://elfio.sourceforge.net" description = "A header-only C++ library that provides a simple interface for reading and generating files in ELF binary format." - topics = ("elfio", "elf") license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://elfio.sourceforge.net" + topics = ("elf", "header-only") package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True + @property + def _min_cppstd(self): + if Version(self.version) < "3.11": + return "11" + elif Version(self.version) < "3.12": + return "14" + else: + return "17" + + @property + def _compilers_minimum_version(self): + return { + # while elfio<3.12 requires C++14, elfio still supports GCC 5 + "17": { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + }, + }.get(self._min_cppstd, {}) + def layout(self): basic_layout(self, src_folder="src") @@ -27,10 +50,12 @@ def package_id(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - if Version(self.version) < "3.11": - check_min_cppstd(self, 11) - else: - check_min_cppstd(self, 14) + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/elfio/all/test_package/CMakeLists.txt b/recipes/elfio/all/test_package/CMakeLists.txt index 6fa586f7cb9435..50113becf9a2c0 100755 --- a/recipes/elfio/all/test_package/CMakeLists.txt +++ b/recipes/elfio/all/test_package/CMakeLists.txt @@ -5,4 +5,10 @@ find_package(elfio REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} PRIVATE elfio::elfio) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +if (elfio_VERSION VERSION_LESS "3.11") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +elseif (elfio_VERSION VERSION_LESS "3.12") + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +else() + target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +endif() diff --git a/recipes/elfio/config.yml b/recipes/elfio/config.yml index 387fbf23f814ba..2d1b3203b5c132 100644 --- a/recipes/elfio/config.yml +++ b/recipes/elfio/config.yml @@ -1,4 +1,6 @@ versions: + "3.12": + folder: all "3.11": folder: all "3.10": diff --git a/recipes/emio/all/conandata.yml b/recipes/emio/all/conandata.yml index 7951ebbf46b659..e7d7963735f4c2 100644 --- a/recipes/emio/all/conandata.yml +++ b/recipes/emio/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.4.0": + url: "https://github.com/viatorus/emio/archive/0.4.0.tar.gz" + sha256: "847198a37fbf9dcc00ac85fbc64b283e41a018f53c39363129a4bdb9939338a6" "0.3.0": url: "https://github.com/viatorus/emio/archive/0.3.0.tar.gz" sha256: "d891d0a435a8b71eee78bba46b9abc3848b1c20d61eb747b6059adaf23acce1d" diff --git a/recipes/emio/config.yml b/recipes/emio/config.yml index d126790212e0c4..3842372f8b1f4d 100644 --- a/recipes/emio/config.yml +++ b/recipes/emio/config.yml @@ -1,3 +1,5 @@ versions: + "0.4.0": + folder: all "0.3.0": folder: all diff --git a/recipes/fmi2/all/conandata.yml b/recipes/fmi2/all/conandata.yml new file mode 100644 index 00000000000000..ca22c244cd704b --- /dev/null +++ b/recipes/fmi2/all/conandata.yml @@ -0,0 +1,5 @@ +sources: + "2.0.4": + url: + - https://github.com/modelica/fmi-standard/releases/download/v2.0.4/FMI-Standard-2.0.4.zip + sha256: "79abb211052d28354a0efff0c6b1998b60a973dd75fdcb338db99ae1b970c9b2" diff --git a/recipes/fmi2/all/conanfile.py b/recipes/fmi2/all/conanfile.py new file mode 100644 index 00000000000000..816be50f782afd --- /dev/null +++ b/recipes/fmi2/all/conanfile.py @@ -0,0 +1,50 @@ +from os import path +from conan import ConanFile +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout + +required_conan_version = ">=1.52.0" + + +class PackageConan(ConanFile): + name = "fmi2" + description = "Functional Mock-up Interface (FMI)" + license = "BSD-2-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://fmi-standard.org" + topics = ("fmi-standard", "co-simulation", "model-exchange", "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 source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=False) + + def build(self): + pass + + def package(self): + copy(self, pattern="LICENSE.txt", dst=path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.h", + src=path.join(self.source_folder, "headers"), + dst=path.join(self.package_folder, "include"), + ) + copy( + self, + pattern="*.xsd", + src=path.join(self.source_folder, "schema"), + dst=path.join(self.package_folder, "res"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.resdirs = ["res"] diff --git a/recipes/fmi2/all/test_package/CMakeLists.txt b/recipes/fmi2/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..7332dbc8b51974 --- /dev/null +++ b/recipes/fmi2/all/test_package/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES C CXX) + +find_package(fmi2 REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE fmi2::fmi2) diff --git a/recipes/fmi2/all/test_package/conanfile.py b/recipes/fmi2/all/test_package/conanfile.py new file mode 100644 index 00000000000000..e730ad6dc0dfc1 --- /dev/null +++ b/recipes/fmi2/all/test_package/conanfile.py @@ -0,0 +1,25 @@ +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 layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + 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, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/fmi2/all/test_package/test_package.cpp b/recipes/fmi2/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..ec96970349ed1d --- /dev/null +++ b/recipes/fmi2/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include <cstdlib> +#include <iostream> +#include "fmi2Functions.h" + + +int main(void) { + std::cout << fmi2Version << std::endl; + + return EXIT_SUCCESS; +} diff --git a/recipes/fmi2/config.yml b/recipes/fmi2/config.yml new file mode 100644 index 00000000000000..1f2301f1f0282d --- /dev/null +++ b/recipes/fmi2/config.yml @@ -0,0 +1,3 @@ +versions: + "2.0.4": + folder: all diff --git a/recipes/frugally-deep/all/conanfile.py b/recipes/frugally-deep/all/conanfile.py index 2588afa778f5bf..4b479f8d56a41d 100644 --- a/recipes/frugally-deep/all/conanfile.py +++ b/recipes/frugally-deep/all/conanfile.py @@ -1,23 +1,30 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" class FrugallyDeepConan(ConanFile): name = "frugally-deep" description = "Use Keras models in C++ with ease." license = "MIT" - topics = ("keras", "tensorflow") - homepage = "https://github.com/Dobiasd/frugally-deep" url = "https://github.com/conan-io/conan-center-index" - settings = "os", "compiler", "build_type", "arch" + homepage = "https://github.com/Dobiasd/frugally-deep" + topics = ("keras", "tensorflow", "header-only") + + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 14 @property def _compilers_minimum_version(self): @@ -27,45 +34,44 @@ def _compilers_minimum_version(self): "clang": "3.7", "apple-clang": "9", } + def layout(self): + basic_layout(self, src_folder="src") def requirements(self): self.requires("eigen/3.4.0") self.requires("functionalplus/0.2.18-p0") - self.requires("nlohmann_json/3.10.5") + self.requires("nlohmann_json/3.11.2") + + def package_id(self): + self.info.clear() def validate(self): if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 14) - - def lazy_lt_semver(v1, v2): - lv1 = [int(v) for v in v1.split(".")] - lv2 = [int(v) for v in v2.split(".")] - min_length = min(len(lv1), len(lv2)) - return lv1[:min_length] < lv2[:min_length] - + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if not minimum_version: - self.output.warn("frugally-deep requires C++14. Your compiler is unknown. Assuming it supports C++14.") - elif lazy_lt_semver(str(self.settings.compiler.version), minimum_version): - raise ConanInvalidConfiguration("frugally-deep requires C++14, which your compiler does not support.") - - def package_id(self): - self.info.header_only() + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) - self.copy("*", dst="include", src=os.path.join(self._source_subfolder, "include")) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy(self, "*", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include")) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] + self.cpp_info.set_property("cmake_file_name", "frugally-deep") self.cpp_info.set_property("cmake_target_name", "frugally-deep::fdeep") # TODO: back to global scope in conan v2 once cmake_find_package* generators removed - self.cpp_info.components["fdeep"].requires = ["eigen::eigen", - "functionalplus::functionalplus", - "nlohmann_json::nlohmann_json"] + self.cpp_info.components["fdeep"].requires = [ + "eigen::eigen", + "functionalplus::functionalplus", + "nlohmann_json::nlohmann_json", + ] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.components["fdeep"].system_libs = ["pthread"] diff --git a/recipes/frugally-deep/all/test_package/CMakeLists.txt b/recipes/frugally-deep/all/test_package/CMakeLists.txt index a8c615c1776b89..b64a8f93f961fd 100644 --- a/recipes/frugally-deep/all/test_package/CMakeLists.txt +++ b/recipes/frugally-deep/all/test_package/CMakeLists.txt @@ -1,8 +1,5 @@ -cmake_minimum_required(VERSION 3.1) -project(test_package) - -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) find_package(frugally-deep REQUIRED CONFIG) diff --git a/recipes/frugally-deep/all/test_package/conanfile.py b/recipes/frugally-deep/all/test_package/conanfile.py index 38f4483872d47f..ef5d7042163ecc 100644 --- a/recipes/frugally-deep/all/test_package/conanfile.py +++ b/recipes/frugally-deep/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +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 = "cmake", "cmake_find_package_multi" + 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) @@ -12,6 +21,6 @@ def build(self): 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) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/frugally-deep/all/test_v1_package/CMakeLists.txt b/recipes/frugally-deep/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/frugally-deep/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +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/) diff --git a/recipes/frugally-deep/all/test_v1_package/conanfile.py b/recipes/frugally-deep/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..38f4483872d47f --- /dev/null +++ b/recipes/frugally-deep/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +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) diff --git a/recipes/functionalplus/all/conandata.yml b/recipes/functionalplus/all/conandata.yml index ca33489d4d5de3..0abf05e2527934 100644 --- a/recipes/functionalplus/all/conandata.yml +++ b/recipes/functionalplus/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.2.20-p0": + url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.20-p0.tar.gz" + sha256: "6a8e56bd7976b7d5a6a31001f36bc199c2997f1144994fa0b48a1a5b8497abbc" "0.2.18-p0": url: "https://github.com/Dobiasd/FunctionalPlus/archive/v0.2.18-p0.tar.gz" sha256: "ffc63fc86f89a205accafa85c35790eda307adf5f1d6d51bb7ceb5c5e21e013b" diff --git a/recipes/functionalplus/config.yml b/recipes/functionalplus/config.yml index 42d00dd1c341a5..bc5d04d53c4bdd 100644 --- a/recipes/functionalplus/config.yml +++ b/recipes/functionalplus/config.yml @@ -1,4 +1,6 @@ versions: + "0.2.20-p0": + folder: all "0.2.18-p0": folder: all "0.2.17-p0": diff --git a/recipes/gegles-spdlog_setup/all/conanfile.py b/recipes/gegles-spdlog_setup/all/conanfile.py index 9385009e7bf437..fd9faf40ac95a5 100644 --- a/recipes/gegles-spdlog_setup/all/conanfile.py +++ b/recipes/gegles-spdlog_setup/all/conanfile.py @@ -40,7 +40,7 @@ def layout(self): def requirements(self): self.requires("cpptoml/0.1.1") self.requires("spdlog/1.12.0") - self.requires("fmt/10.1.0") + self.requires("fmt/10.1.1") def package_id(self): self.info.clear() diff --git a/recipes/gettext/all/conanfile.py b/recipes/gettext/all/conanfile.py index 72a7afc2b30cc1..433bf975c10870 100644 --- a/recipes/gettext/all/conanfile.py +++ b/recipes/gettext/all/conanfile.py @@ -5,6 +5,7 @@ from conan.tools.env import Environment, VirtualBuildEnv from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir from conan.tools.gnu import AutotoolsToolchain, Autotools +from conan.tools.layout import basic_layout from conan.tools.microsoft import check_min_vs, is_msvc, unix_path, unix_path_package_info_legacy from conan.tools.scm import Version @@ -31,26 +32,29 @@ def configure(self): self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") + def layout(self): + basic_layout(self, src_folder="src") + def requirements(self): self.requires("libiconv/1.17") - def build_requirements(self): - if self._settings_build.os == "Windows" and not self.conf.get("tools.microsoft.bash:path", check_type=str): - self.win_bash = True - self.tool_requires("msys2/cci.latest") - if is_msvc(self): - self.build_requires("automake/1.16.5") + def package_id(self): + del self.info.settings.compiler def validate(self): if Version(self.version) < "0.21" and is_msvc(self): raise ConanInvalidConfiguration("MSVC builds of gettext for versions < 0.21 are not supported.") # FIXME: it used to be possible. What changed? - def package_id(self): - del self.info.settings.compiler + def build_requirements(self): + if self._settings_build.os == "Windows": + self.win_bash = True + if not self.conf.get("tools.microsoft.bash:path", check_type=str): + self.tool_requires("msys2/cci.latest") + if is_msvc(self): + self.build_requires("automake/1.16.5") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): env = VirtualBuildEnv(self) @@ -118,9 +122,9 @@ def build(self): def package(self): autotools = Autotools(self) autotools.install() - + copy(self, pattern="COPYING", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses")) - + rmdir(self, os.path.join(self.package_folder, "lib")) rmdir(self, os.path.join(self.package_folder, "include")) rmdir(self, os.path.join(self.package_folder, "share", "doc")) @@ -135,14 +139,8 @@ def package_info(self): autopoint = os.path.join(self.package_folder, "bin", "autopoint") self.buildenv_info.append_path("ACLOCAL_PATH", aclocal) self.buildenv_info.define_path("AUTOPOINT", autopoint) - - # TODO: the following can be removed when the recipe supports Conan >= 2.0 only - bindir = os.path.join(self.package_folder, "bin") - self.output.info("Appending PATH environment variable: {}".format(bindir)) - self.env_info.PATH.append(bindir) - self.output.info("Appending AUTOMAKE_CONAN_INCLUDES environment variable: {}".format(aclocal)) + # TODO: the following can be removed when the recipe supports Conan >= 2.0 only + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) self.env_info.AUTOMAKE_CONAN_INCLUDES.append(unix_path_package_info_legacy(self, aclocal)) - - self.output.info("Setting AUTOPOINT environment variable: {}".format(autopoint)) self.env_info.AUTOPOINT = unix_path_package_info_legacy(self, autopoint) diff --git a/recipes/implot/all/conanfile.py b/recipes/implot/all/conanfile.py index 20e340b605f31e..f2fa4d63a05867 100644 --- a/recipes/implot/all/conanfile.py +++ b/recipes/implot/all/conanfile.py @@ -39,7 +39,7 @@ def configure(self): def requirements(self): if Version(self.version) >= "0.15": - self.requires("imgui/1.89.8", transitive_headers=True) + self.requires("imgui/1.89.9", transitive_headers=True) elif Version(self.version) >= "0.14": self.requires("imgui/1.89.4", transitive_headers=True) elif Version(self.version) >= "0.13": diff --git a/recipes/lazycsv/all/conandata.yml b/recipes/lazycsv/all/conandata.yml new file mode 100644 index 00000000000000..1f9c6533da7ceb --- /dev/null +++ b/recipes/lazycsv/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "cci.20221117": + url: "https://github.com/ashtum/lazycsv/archive/844e3f318af2d9ede96039dd9f57ebf4cad59ce2.tar.gz" + sha256: "cb8592fc0b563a1236dfadfc423a91d63e705ff0086941218800abda22530540" diff --git a/recipes/lazycsv/all/conanfile.py b/recipes/lazycsv/all/conanfile.py new file mode 100644 index 00000000000000..f0f8f490335f92 --- /dev/null +++ b/recipes/lazycsv/all/conanfile.py @@ -0,0 +1,72 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +from conan.tools.microsoft import is_msvc +import os + + +required_conan_version = ">=1.52.0" + + +class LazyCSVConan(ConanFile): + name = "lazycsv" + description = "A fast, lightweight and single-header C++ csv parser library" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ashtum/lazycsv" + topics = ("csv", "csv-parser", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + if is_msvc(self): + raise ConanInvalidConfiguration( + f"{self.ref} doen't support MSVC." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/lazycsv/all/test_package/CMakeLists.txt b/recipes/lazycsv/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..655f63d80bdcf5 --- /dev/null +++ b/recipes/lazycsv/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(lazycsv REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE lazycsv::lazycsv) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/lazycsv/all/test_package/conanfile.py b/recipes/lazycsv/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/lazycsv/all/test_package/conanfile.py @@ -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 layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + 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, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/lazycsv/all/test_package/test_package.cpp b/recipes/lazycsv/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..c0e33ee18739a8 --- /dev/null +++ b/recipes/lazycsv/all/test_package/test_package.cpp @@ -0,0 +1,10 @@ +#include <iostream> +#include "lazycsv.hpp" + + +int main(void) { + std::string csv_data{ "name,lastname,age\nPeter,Griffin,45\nchris,Griffin,14\n" }; + + lazycsv::parser<std::string_view> parser_a{ csv_data }; + lazycsv::parser<std::string> parser_b{ csv_data }; +} diff --git a/recipes/lazycsv/config.yml b/recipes/lazycsv/config.yml new file mode 100644 index 00000000000000..4d61dda20e41ab --- /dev/null +++ b/recipes/lazycsv/config.yml @@ -0,0 +1,3 @@ +versions: + "cci.20221117": + folder: all diff --git a/recipes/lely-core/all/conanfile.py b/recipes/lely-core/all/conanfile.py index f57056df761975..9ed8f191a0a192 100644 --- a/recipes/lely-core/all/conanfile.py +++ b/recipes/lely-core/all/conanfile.py @@ -1,33 +1,23 @@ import os from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.env import VirtualBuildEnv +from conan.tools.files import copy, get, rm, rmdir from conan.tools.gnu import AutotoolsToolchain, Autotools from conan.tools.layout import basic_layout -from conan.tools.apple import fix_apple_shared_install_name -from conan.tools.files import ( - export_conandata_patches, - apply_conandata_patches, - get, - copy, - rmdir, - rm, -) -from conan.errors import ConanInvalidConfiguration required_conan_version = ">=1.53.0" class LelyConan(ConanFile): name = "lely-core" - - # Optional metadata license = "Apache-2.0" homepage = "https://gitlab.com/lely_industries/lely-core/" url = "https://github.com/conan-io/conan-center-index" description = "The Lely core libraries are a collection of C and C++ libraries and tools, providing high-performance I/O and sensor/actuator control for robotics and IoT applications. The libraries are cross-platform and have few dependencies. They can be even be used on bare-metal microcontrollers with as little as 32 kB RAM." topics = ("canopen",) - - # Binary configuration + package_type = "library" settings = "os", "compiler", "build_type", "arch" options = { "shared": [True, False], @@ -108,13 +98,17 @@ class LelyConan(ConanFile): "coapp-slave": True, } - def export_sources(self): - export_conandata_patches(self) - def config_options(self): if self.settings.os == "Windows": self.options.rm_safe("fPIC") + def configure(self): + if self.options.shared: + self.options.rm_safe("fPIC") + + def layout(self): + basic_layout(self, src_folder="src") + def validate(self): if self.settings.os != "Linux": raise ConanInvalidConfiguration( @@ -127,20 +121,18 @@ def validate(self): f"{self.ref} can only be compiled with GCC currently" ) - def source(self): - get( - self, - **self.conan_data["sources"][self.version], - destination=self.source_folder, - strip_root=True, - ) + def build_requirements(self): + self.tool_requires("libtool/2.4.7") - def layout(self): - basic_layout(self, src_folder="src") + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): - at_toolchain = AutotoolsToolchain(self) - at_toolchain.configure_args += [ + env = VirtualBuildEnv(self) + env.generate() + + tc = AutotoolsToolchain(self) + tc.configure_args += [ "--disable-cython", "--disable-python", "--disable-tools", @@ -148,7 +140,7 @@ def generate(self): "--disable-maintainer-mode", ] if self.options.get_safe("ecss-compliance"): - at_toolchain.configure_args.append("--enable-ecss-compliance") + tc.configure_args.append("--enable-ecss-compliance") disable_options = { "threads", @@ -188,16 +180,11 @@ def generate(self): } for option in disable_options: if not self.options.get_safe(option): - at_toolchain.configure_args.append(f"--disable-{option}") - - at_toolchain.generate() + tc.configure_args.append(f"--disable-{option}") - def configure(self): - if self.options.shared: - self.options.rm_safe("fPIC") + tc.generate() def build(self): - apply_conandata_patches(self) autotools = Autotools(self) autotools.autoreconf() autotools.configure() @@ -206,7 +193,6 @@ def build(self): def package(self): autotools = Autotools(self) autotools.install() - fix_apple_shared_install_name(self) copy( self, @@ -232,6 +218,7 @@ def package_info(self): "util": {"requires": ["libc"], "system_libs": ["m"]}, } for component, dependencies in components.items(): + self.cpp_info.components[component].set_property("pkg_config_name", f"liblely-{component}") self.cpp_info.components[component].libs = [f"lely-{component}"] self.cpp_info.components[component].requires = dependencies.get( "requires", [] diff --git a/recipes/libalsa/all/conandata.yml b/recipes/libalsa/all/conandata.yml index 55a14a6d4051e6..c612ddb389783b 100644 --- a/recipes/libalsa/all/conandata.yml +++ b/recipes/libalsa/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.2.10": + url: "https://github.com/alsa-project/alsa-lib/archive/v1.2.10.tar.gz" + sha256: "f55749847fd98274501f4691a2d847e89280c07d40a43cdac43d6443f69fc939" "1.2.7.2": url: "https://github.com/alsa-project/alsa-lib/archive/v1.2.7.2.tar.gz" sha256: "2ed6d908120beb4a91c2271b01489181b28dc9f35f32229ef83bcd5ac8817654" diff --git a/recipes/libalsa/config.yml b/recipes/libalsa/config.yml index b1fdda2825fa62..ce651c2f0d63a3 100644 --- a/recipes/libalsa/config.yml +++ b/recipes/libalsa/config.yml @@ -1,4 +1,6 @@ versions: + "1.2.10": + folder: all "1.2.7.2": folder: all "1.2.7": diff --git a/recipes/libdeflate/all/conandata.yml b/recipes/libdeflate/all/conandata.yml index 01ec059a63c200..720157d82ac2bd 100644 --- a/recipes/libdeflate/all/conandata.yml +++ b/recipes/libdeflate/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.19": + url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.19.tar.gz" + sha256: "27bf62d71cd64728ff43a9feb92f2ac2f2bf748986d856133cc1e51992428c25" "1.18": url: "https://github.com/ebiggers/libdeflate/archive/refs/tags/v1.18.tar.gz" sha256: "225d982bcaf553221c76726358d2ea139bb34913180b20823c782cede060affd" diff --git a/recipes/libdeflate/config.yml b/recipes/libdeflate/config.yml index 2ecdca807a8d64..fe3db2bc74050b 100644 --- a/recipes/libdeflate/config.yml +++ b/recipes/libdeflate/config.yml @@ -1,4 +1,6 @@ versions: + "1.19": + folder: "all" "1.18": folder: "all" "1.17": diff --git a/recipes/libinterpolate/all/conanfile.py b/recipes/libinterpolate/all/conanfile.py index b1c88daae5803a..c6aadd8b682fe0 100644 --- a/recipes/libinterpolate/all/conanfile.py +++ b/recipes/libinterpolate/all/conanfile.py @@ -17,6 +17,7 @@ class PackageConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/CD3/libInterpolate" topics = ("math", "spline", "interpolation", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -28,13 +29,12 @@ def _min_cppstd(self): def _compilers_minimum_version(self): return { "Visual Studio": "15", - "msvc": "19.0", + "msvc": "191", "gcc": "7", "clang": "4", "apple-clang": "10", } - def layout(self): basic_layout(self, src_folder="src") @@ -42,6 +42,9 @@ def requirements(self): self.requires("boost/1.80.0", transitive_headers=True) self.requires("eigen/3.3.7", transitive_headers=True) + def package_id(self): + self.info.clear() + def validate(self): if Version(self.version) < "2.6.4" and self.settings.os != "Linux": raise ConanInvalidConfiguration(f"{self.ref} is not supported by {self.settings.os}; Try the version >= 2.6.4") @@ -80,9 +83,6 @@ def package(self): src=os.path.join(self.source_folder, "src"), ) - def package_id(self): - self.info.clear() - def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] diff --git a/recipes/libnl/all/conandata.yml b/recipes/libnl/all/conandata.yml index cf3856e1f84ca3..c4437c5cec3bc6 100644 --- a/recipes/libnl/all/conandata.yml +++ b/recipes/libnl/all/conandata.yml @@ -1,7 +1,10 @@ sources: + "3.8.0": + url: "https://github.com/thom311/libnl/releases/download/libnl3_8_0/libnl-3.8.0.tar.gz" + sha256: "bb726c6d7a08b121978d73ff98425bf313fa26a27a331d465e4f1d7ec5b838c6" "3.7.0": - sha256: 9fe43ccbeeea72c653bdcf8c93332583135cda46a79507bfd0a483bb57f65939 - url: https://github.com/thom311/libnl/releases/download/libnl3_7_0/libnl-3.7.0.tar.gz + url: "https://github.com/thom311/libnl/releases/download/libnl3_7_0/libnl-3.7.0.tar.gz" + sha256: "9fe43ccbeeea72c653bdcf8c93332583135cda46a79507bfd0a483bb57f65939" "3.2.25": - sha256: 8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5 - url: https://github.com/thom311/libnl/releases/download/libnl3_2_25/libnl-3.2.25.tar.gz + url: "https://github.com/thom311/libnl/releases/download/libnl3_2_25/libnl-3.2.25.tar.gz" + sha256: "8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5" diff --git a/recipes/libnl/all/conanfile.py b/recipes/libnl/all/conanfile.py index 2dd67d7ee45afd..a355e8b21201e2 100644 --- a/recipes/libnl/all/conanfile.py +++ b/recipes/libnl/all/conanfile.py @@ -7,38 +7,42 @@ required_conan_version = ">=1.53.0" - class LibNlConan(ConanFile): name = "libnl" description = "A collection of libraries providing APIs to netlink protocol based Linux kernel interfaces." - topics = ("netlink") - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://www.infradead.org/~tgr/libnl/" license = "LGPL-2.1-only" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/thom311/libnl" + topics = ("netlink") settings = "os", "arch", "compiler", "build_type" - options = {"fPIC": [True, False], "shared": [True, False]} - default_options = {"fPIC": True, "shared": False} - - def build_requirements(self): - self.tool_requires("bison/3.8.2") - self.tool_requires("flex/2.6.4") - - def source(self): - get(self, **self.conan_data["sources"][self.version], strip_root=True) + options = { + "fPIC": [True, False], + "shared": [True, False], + } + default_options = { + "fPIC": True, + "shared": False, + } def configure(self): if self.options.shared: self.options.rm_safe("fPIC") - # This is a pure C library self.settings.rm_safe("compiler.libcxx") self.settings.rm_safe("compiler.cppstd") + def layout(self): + basic_layout(self, src_folder="src") + def validate(self): if self.settings.os != "Linux": - raise ConanInvalidConfiguration("Libnl is only supported on Linux") + raise ConanInvalidConfiguration(f"{self.ref} is only supported on Linux") - def layout(self): - basic_layout(self, src_folder="src") + def build_requirements(self): + self.tool_requires("bison/3.8.2") + self.tool_requires("flex/2.6.4") + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = AutotoolsToolchain(self) @@ -61,8 +65,7 @@ def package(self): def package_info(self): self.cpp_info.components["nl"].libs = ["nl-3"] self.cpp_info.components["nl"].includedirs = [os.path.join('include', 'libnl3')] - if self.settings.os != "Windows": - self.cpp_info.components["nl"].system_libs = ["pthread", "m"] + self.cpp_info.components["nl"].system_libs = ["pthread", "m"] self.cpp_info.components["nl-route"].libs = ["nl-route-3"] self.cpp_info.components["nl-route"].requires = ["nl"] self.cpp_info.components["nl-genl"].libs = ["nl-genl-3"] @@ -71,7 +74,6 @@ def package_info(self): self.cpp_info.components["nl-nf"].requires = ["nl-route"] self.cpp_info.components["nl-cli"].libs = ["nl-cli-3"] self.cpp_info.components["nl-cli"].requires = ["nl-nf", "nl-genl"] - if self.settings.os != "Windows": - self.cpp_info.components["nl-cli"].system_libs = ["dl"] + self.cpp_info.components["nl-cli"].system_libs = ["dl"] self.cpp_info.components["nl-idiag"].libs = ["nl-idiag-3"] self.cpp_info.components["nl-idiag"].requires = ["nl"] diff --git a/recipes/libnl/config.yml b/recipes/libnl/config.yml index 3901cc1eb7ac99..20abb72c5e1b94 100644 --- a/recipes/libnl/config.yml +++ b/recipes/libnl/config.yml @@ -1,4 +1,6 @@ versions: + 3.8.0: + folder: all 3.7.0: folder: all 3.2.25: diff --git a/recipes/libsystemd/all/conanfile.py b/recipes/libsystemd/all/conanfile.py index 7d0c3d3c0590fa..0836b21234ebc0 100644 --- a/recipes/libsystemd/all/conanfile.py +++ b/recipes/libsystemd/all/conanfile.py @@ -82,7 +82,7 @@ def source(self): @property def _so_version(self): meson_build = os.path.join(self.source_folder, "meson.build") - with open(meson_build, "r") as build_file: + with open(meson_build, "r", encoding="utf-8") as build_file: for line in build_file: match = re.match(r"^libsystemd_version = '(.*)'$", line) if match: diff --git a/recipes/mathfu/all/conanfile.py b/recipes/mathfu/all/conanfile.py index 1b35d3c154c774..ec12916dc298be 100644 --- a/recipes/mathfu/all/conanfile.py +++ b/recipes/mathfu/all/conanfile.py @@ -13,6 +13,7 @@ class MathfuConan(ConanFile): license = "Apache-2.0" homepage = "https://github.com/google/mathfu" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -20,14 +21,13 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("vectorial/cci.20190628", transitive_headers=True, transitive_libs=True) + self.requires("vectorial/cci.20190628") def package_id(self): self.info.clear() def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass diff --git a/recipes/oboe/all/conanfile.py b/recipes/oboe/all/conanfile.py index a70215ca04760d..ee8b970e7d9a35 100644 --- a/recipes/oboe/all/conanfile.py +++ b/recipes/oboe/all/conanfile.py @@ -15,7 +15,7 @@ class OboeConan(ConanFile): topics = ("android", "audio") homepage = "https://github.com/google/oboe" url = "https://github.com/conan-io/conan-center-index" - + package_type = "library" settings = "os", "arch", "compiler", "build_type", options = { "shared": [True, False], @@ -33,15 +33,15 @@ def configure(self): if self.options.shared: self.options.rm_safe("fPIC") + def layout(self): + cmake_layout(self, src_folder="src") + def validate(self): if self.settings.os != "Android": raise ConanInvalidConfiguration("oboe supports Android only") if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 17) - def layout(self): - cmake_layout(self, src_folder="src") - def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/pcre2/all/conanfile.py b/recipes/pcre2/all/conanfile.py index 5982290e7cdbe1..14600c9abe85c9 100644 --- a/recipes/pcre2/all/conanfile.py +++ b/recipes/pcre2/all/conanfile.py @@ -16,7 +16,7 @@ class PCRE2Conan(ConanFile): description = "Perl Compatible Regular Expressions" topics = ("regex", "regexp", "perl") license = "BSD-3-Clause" - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -65,7 +65,7 @@ def layout(self): def requirements(self): if self.options.get_safe("with_zlib"): - self.requires("zlib/1.2.13") + self.requires("zlib/[>=1.2.11 <2]") if self.options.get_safe("with_bzip2"): self.requires("bzip2/1.0.8") @@ -76,8 +76,7 @@ def validate(self): raise ConanInvalidConfiguration("build_pcre2_8 must be enabled for the pcre2grep program") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/platform.converters/all/conanfile.py b/recipes/platform.converters/all/conanfile.py index 4991da89bae2cc..2979e31430f9ba 100644 --- a/recipes/platform.converters/all/conanfile.py +++ b/recipes/platform.converters/all/conanfile.py @@ -1,28 +1,30 @@ -from conans import ConanFile, CMake, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.33.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" class PlatformConvertersConan(ConanFile): name = "platform.converters" + description = "platform.converters is one of the libraries of the LinksPlatform modular framework, to provide conversions between different types" license = "MIT" - homepage = "https://github.com/linksplatform/Converters" url = "https://github.com/conan-io/conan-center-index" - description = "platform.converters is one of the libraries of the LinksPlatform modular framework, " \ - "to provide conversions between different types" - topics = ("linksplatform", "cpp20", "converters", "any", "native") - settings = "compiler", "arch" - no_copy_source = True + homepage = "https://github.com/linksplatform/Converters" + topics = ("linksplatform", "cpp20", "converters", "any", "native", "header-only") - @property - def _source_subfolder(self): - return "source_subfolder" + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property - def _internal_cpp_subfolder(self): - return os.path.join(self._source_subfolder, "cpp", "Platform.Converters") + def _minimum_cpp_standard(self): + return 20 @property def _compilers_minimum_version(self): @@ -30,36 +32,41 @@ def _compilers_minimum_version(self): "gcc": "10", "Visual Studio": "16", "clang": "14", - "apple-clang": "14" + "apple-clang": "14", } - @property - def _minimum_cpp_standard(self): - return 20 + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() def validate(self): minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler)) if not minimum_version: - self.output.warn("{} recipe lacks information about the {} compiler support.".format( - self.name, self.settings.compiler)) + self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") - elif tools.Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration("{}/{} requires c++{}, " - "which is not supported by {} {}.".format( - self.name, self.version, self._minimum_cpp_standard, self.settings.compiler, - self.settings.compiler.version)) + elif Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.name}/{self.version} requires c++{self._minimum_cpp_standard}, " + f"which is not supported by {self.settings.compiler} {self.settings.compiler.version}." + ) if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, self._minimum_cpp_standard) - - def package_id(self): - self.info.header_only() + check_min_cppstd(self, self._minimum_cpp_standard) def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + @property + def _internal_cpp_subfolder(self): + return os.path.join(self.source_folder, "cpp", "Platform.Converters") def package(self): - self.copy("*.h", dst="include", src=self._internal_cpp_subfolder) - self.copy("LICENSE", dst="licenses", src=self._source_subfolder) + copy(self, "*.h", dst=os.path.join(self.package_folder, "include"), src=self._internal_cpp_subfolder) + copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/platform.converters/all/test_package/CMakeLists.txt b/recipes/platform.converters/all/test_package/CMakeLists.txt index 80c8108b7c3f74..3372d3e73b1861 100644 --- a/recipes/platform.converters/all/test_package/CMakeLists.txt +++ b/recipes/platform.converters/all/test_package/CMakeLists.txt @@ -1,10 +1,7 @@ -cmake_minimum_required(VERSION 3.8) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - -find_package(platform.converters CONFIG REQUIRED) +find_package(platform.converters REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries(${PROJECT_NAME} platform.converters::platform.converters) diff --git a/recipes/platform.converters/all/test_package/conanfile.py b/recipes/platform.converters/all/test_package/conanfile.py index 49a3a66ea5bad4..ef5d7042163ecc 100644 --- a/recipes/platform.converters/all/test_package/conanfile.py +++ b/recipes/platform.converters/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +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", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package_multi" + 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) @@ -12,6 +21,6 @@ def build(self): 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) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/platform.converters/all/test_package/test_package.cpp b/recipes/platform.converters/all/test_package/test_package.cpp index 283e7f59b558b9..47a24cfe4903b6 100644 --- a/recipes/platform.converters/all/test_package/test_package.cpp +++ b/recipes/platform.converters/all/test_package/test_package.cpp @@ -5,8 +5,8 @@ using namespace Platform::Converters; int main() { - int source {48}; + int source{48}; char to = Converter<int, char>::Convert(source); - std::cout<<"int value: "<<source<<"\nchar value: "<<to<<'\n'; + std::cout << "int value: " << source << "\nchar value: " << to << '\n'; return 0; } diff --git a/recipes/platform.converters/all/test_v1_package/CMakeLists.txt b/recipes/platform.converters/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/platform.converters/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +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/) diff --git a/recipes/platform.converters/all/test_v1_package/conanfile.py b/recipes/platform.converters/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..49a3a66ea5bad4 --- /dev/null +++ b/recipes/platform.converters/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +from conans import ConanFile, CMake, tools +import os + + +class TestPackageConan(ConanFile): + settings = "os", "compiler", "build_type", "arch" + 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) diff --git a/recipes/platform.equality/all/conanfile.py b/recipes/platform.equality/all/conanfile.py index 8aa89e267366d6..aa27ad1916e7f8 100644 --- a/recipes/platform.equality/all/conanfile.py +++ b/recipes/platform.equality/all/conanfile.py @@ -26,7 +26,7 @@ class PlatformInterfacesConan(ConanFile): no_copy_source = True @property - def _minimum_cpp_standard(self): + def _min_cppstd(self): return 20 @property @@ -38,6 +38,7 @@ def _compilers_minimum_version(self): return { "gcc": "10", "Visual Studio": "16", + "msvc": "192", "clang": "11", "apple-clang": "11", } @@ -50,15 +51,12 @@ def package_id(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, self._minimum_cpp_standard) + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler)) - if not minimum_version: - self.output.warning(f"{self.name} recipe lacks information about the {self.settings.compiler} compiler support.") - elif Version(self.settings.compiler.version) < minimum_version: + if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._minimum_cpp_standard} with {self.settings.compiler}, " - f"which is not supported by {self.settings.compiler} {self.settings.compiler.version}." + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." ) if self.settings.compiler in ["clang", "apple-clang"] and not str(self.settings.compiler.libcxx).startswith("libstdc++"): diff --git a/recipes/platform.hashing/all/conanfile.py b/recipes/platform.hashing/all/conanfile.py index bb49b80ef8c5ee..0e0affe79e746a 100644 --- a/recipes/platform.hashing/all/conanfile.py +++ b/recipes/platform.hashing/all/conanfile.py @@ -50,7 +50,7 @@ def requirements(self): if Version(self.version) >= "0.5.6": self.requires("cpuinfo/cci.20220228", transitive_headers=True) elif Version(self.version) >= "0.5.0": - self.requires("cpu_features/0.8.0", transitive_headers=True) + self.requires("cpu_features/0.9.0", transitive_headers=True) def package_id(self): self.info.clear() diff --git a/recipes/redboltz-mqtt_cpp/all/conanfile.py b/recipes/redboltz-mqtt_cpp/all/conanfile.py index 5ca0f086f35bf9..2b3717a2d67c0f 100644 --- a/recipes/redboltz-mqtt_cpp/all/conanfile.py +++ b/recipes/redboltz-mqtt_cpp/all/conanfile.py @@ -30,7 +30,8 @@ def _min_cppstd(self): def _compilers_minimum_version(self): return { "gcc": "6", - "Visual Studio": "15.0", + "Visual Studio": "15", + "msvc": "191", "clang": "5", "apple-clang": "10", } @@ -49,11 +50,10 @@ def validate(self): check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version: - if Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration(f"{self.name} requires C++14, which your compiler does not support.") - else: - self.output.warning(f"{self.name} requires C++14. Your compiler is unknown. Assuming it supports C++14.") + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) diff --git a/recipes/sdbus-cpp/all/conandata.yml b/recipes/sdbus-cpp/all/conandata.yml index 97d55c77fac397..ac3e9f3df91887 100644 --- a/recipes/sdbus-cpp/all/conandata.yml +++ b/recipes/sdbus-cpp/all/conandata.yml @@ -19,10 +19,10 @@ patches: "1.0.0": - patch_file: "patches/0002-correct-readme-cpack-resource-path.patch" patch_description: "fix out of tree build by using proper paths in cmake file" - patch_type: "backport" + patch_type: "bugfix" patch_source: "https://github.com/Kistler-Group/sdbus-cpp/commit/0b8f2d97524f354bcaf816b27b6139a5b0c480ba" "0.8.3": - patch_file: "patches/0001-xml2cpp-Add-missing-EXPAT-include-dirs-136.patch" patch_description: "fix build error by adding missing headers" - patch_type: "backport" + patch_type: "bugfix" patch_source: "https://github.com/Kistler-Group/sdbus-cpp/commit/fb008445b15b452f461c34667f4991f5ce06e481" diff --git a/recipes/seqan3/all/conanfile.py b/recipes/seqan3/all/conanfile.py index ef55f38b024ff0..10b57ed42fdf79 100644 --- a/recipes/seqan3/all/conanfile.py +++ b/recipes/seqan3/all/conanfile.py @@ -1,60 +1,69 @@ -from conans import ConanFile, tools -from conans.errors import ConanInvalidConfiguration import os -required_conan_version = ">=1.43.0" +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import copy, get +from conan.tools.layout import basic_layout +from conan.tools.scm import Version + +required_conan_version = ">=1.52.0" class Seqan3Conan(ConanFile): name = "seqan3" - url = "https://github.com/conan-io/conan-center-index" - homepage = "https://github.com/seqan/seqan3" description = "SeqAn3 is the new version of the popular SeqAn template library for the analysis of biological sequences." - topics = ("cpp20", "algorithms", "data structures", "biological sequences") license = "BSD-3-Clause" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/seqan/seqan3" + topics = ("cpp20", "algorithms", "data structures", "biological sequences", "header-only") + + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @property - def _source_subfolder(self): - return "source_subfolder" + def _min_cppstd(self): + return 20 @property def _compilers_minimum_version(self): - return { - "gcc": "10", - } + return {"gcc": "10"} + + def layout(self): + basic_layout(self, src_folder="src") def package_id(self): - self.info.header_only() + self.info.clear() def validate(self): if self.settings.compiler != "gcc": raise ConanInvalidConfiguration("SeqAn3 only supports GCC.") if self.settings.compiler.get_safe("cppstd"): - tools.check_min_cppstd(self, 20) + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version: - if tools.Version(self.settings.compiler.version) < minimum_version: + if Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration("SeqAn3 requires C++20, which your compiler does not fully support.") else: - self.output.warn("SeqAn3 requires C++20. Your compiler is unknown. Assuming it supports C++20.") + self.output.warning("SeqAn3 requires C++20. Your compiler is unknown. Assuming it supports C++20.") if self.settings.compiler == "gcc" and self.settings.compiler.libcxx != "libstdc++11": - self.output.warn("SeqAn3 does not actively support libstdc++, consider using libstdc++11 instead.") + self.output.warning("SeqAn3 does not actively support libstdc++, consider using libstdc++11 instead.") def source(self): - tools.get(**self.conan_data["sources"][self.version], - destination=self._source_subfolder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): - self.copy("*", dst="include", - src=os.path.join(self._source_subfolder, "include"), keep_path=True) + copy(self, "*", dst=os.path.join(self.package_folder, "include"), src=os.path.join(self.source_folder, "include"), keep_path=True) + copy(self, "LICENSE.md", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) for submodule in ["range-v3", "cereal", "sdsl-lite"]: - self.copy("*.hpp", dst="include", - src=os.path.join(self._source_subfolder, "submodules", submodule, "include"), keep_path=True) - self.copy("LICENSE.md", dst="licenses", src=self._source_subfolder) + copy(self, "*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "submodules", submodule, "include"), + keep_path=True) def package_info(self): self.cpp_info.set_property("cmake_file_name", "seqan3") diff --git a/recipes/seqan3/all/test_package/CMakeLists.txt b/recipes/seqan3/all/test_package/CMakeLists.txt index 8c21ec19c63842..11e58315f3f7e9 100644 --- a/recipes/seqan3/all/test_package/CMakeLists.txt +++ b/recipes/seqan3/all/test_package/CMakeLists.txt @@ -1,9 +1,6 @@ -cmake_minimum_required(VERSION 3.12) +cmake_minimum_required(VERSION 3.15) project(test_package CXX) -include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) -conan_basic_setup(TARGETS) - find_package(seqan3 REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) diff --git a/recipes/seqan3/all/test_package/conanfile.py b/recipes/seqan3/all/test_package/conanfile.py index 38f4483872d47f..ef5d7042163ecc 100644 --- a/recipes/seqan3/all/test_package/conanfile.py +++ b/recipes/seqan3/all/test_package/conanfile.py @@ -1,10 +1,19 @@ -from conans import ConanFile, CMake, tools +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 = "cmake", "cmake_find_package_multi" + 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) @@ -12,6 +21,6 @@ def build(self): 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) + if can_run(self): + bin_path = os.path.join(self.cpp.build.bindir, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/seqan3/all/test_v1_package/CMakeLists.txt b/recipes/seqan3/all/test_v1_package/CMakeLists.txt new file mode 100644 index 00000000000000..91630d79f4abb3 --- /dev/null +++ b/recipes/seqan3/all/test_v1_package/CMakeLists.txt @@ -0,0 +1,8 @@ +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/) diff --git a/recipes/seqan3/all/test_v1_package/conanfile.py b/recipes/seqan3/all/test_v1_package/conanfile.py new file mode 100644 index 00000000000000..38f4483872d47f --- /dev/null +++ b/recipes/seqan3/all/test_v1_package/conanfile.py @@ -0,0 +1,17 @@ +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) diff --git a/recipes/spectra/all/conanfile.py b/recipes/spectra/all/conanfile.py index 084f85d8c49505..7f108912c8a5cf 100644 --- a/recipes/spectra/all/conanfile.py +++ b/recipes/spectra/all/conanfile.py @@ -15,6 +15,7 @@ class SpectraConan(ConanFile): topics = ("eigenvalue", "header-only") homepage = "https://spectralib.org" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -33,8 +34,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass diff --git a/recipes/ssp/all/conandata.yml b/recipes/ssp/all/conandata.yml new file mode 100644 index 00000000000000..72dce2c480ffe4 --- /dev/null +++ b/recipes/ssp/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.6.1": + url: "https://github.com/red0124/ssp/archive/refs/tags/v1.6.1.tar.gz" + sha256: "4cdf75959b0a5fabd0b3e6ec1bad41d7c3f298d5b7f822d6e12b7e4d7dfcdd34" diff --git a/recipes/ssp/all/conanfile.py b/recipes/ssp/all/conanfile.py new file mode 100644 index 00000000000000..7d75955713fe5e --- /dev/null +++ b/recipes/ssp/all/conanfile.py @@ -0,0 +1,68 @@ +from conan import ConanFile +from conan.errors import ConanInvalidConfiguration +from conan.tools.build import check_min_cppstd +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.scm import Version +import os + +required_conan_version = ">=1.52.0" + +class SspConan(ConanFile): + name = "ssp" + description = "C++ CSV parser" + license = "MIT" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/red0124/ssp" + topics = ("csv", "parser", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 17 + + @property + def _compilers_minimum_version(self): + return { + "gcc": "8", + "clang": "7", + "apple-clang": "12", + "Visual Studio": "16", + "msvc": "192", + } + + def layout(self): + basic_layout(self, src_folder="src") + + def requirements(self): + self.requires("fast_float/5.2.0") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support." + ) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + def package(self): + copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) + copy( + self, + pattern="*.hpp", + dst=os.path.join(self.package_folder, "include"), + src=os.path.join(self.source_folder, "include"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/ssp/all/test_package/CMakeLists.txt b/recipes/ssp/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..16a9ddec507217 --- /dev/null +++ b/recipes/ssp/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.8) +project(test_package LANGUAGES CXX) + +find_package(ssp REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE ssp::ssp) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) diff --git a/recipes/ssp/all/test_package/conanfile.py b/recipes/ssp/all/test_package/conanfile.py new file mode 100644 index 00000000000000..e845ae751a3017 --- /dev/null +++ b/recipes/ssp/all/test_package/conanfile.py @@ -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 layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + 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") diff --git a/recipes/ssp/all/test_package/test_package.cpp b/recipes/ssp/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..f3a0c45ba85136 --- /dev/null +++ b/recipes/ssp/all/test_package/test_package.cpp @@ -0,0 +1,12 @@ +#include "ss/converter.hpp" + +int main() { + auto converter = ss::converter{}; + + auto val = converter.convert<int>("5"); + + if (val == 5) { + return 0; + } + return 1; +} diff --git a/recipes/ssp/config.yml b/recipes/ssp/config.yml new file mode 100644 index 00000000000000..bd3f43d241a52a --- /dev/null +++ b/recipes/ssp/config.yml @@ -0,0 +1,3 @@ +versions: + "1.6.1": + folder: all diff --git a/recipes/stringzilla/all/conandata.yml b/recipes/stringzilla/all/conandata.yml new file mode 100644 index 00000000000000..f529350a7dc33f --- /dev/null +++ b/recipes/stringzilla/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.1.3": + url: "https://github.com/ashvardanian/StringZilla/archive/refs/tags/v1.1.3.tar.gz" + sha256: "1856c4d780b2c9a12ccd14d04996b35bec9fe537d0a31209000e12777a86e495" diff --git a/recipes/stringzilla/all/conanfile.py b/recipes/stringzilla/all/conanfile.py new file mode 100644 index 00000000000000..bded9fa3b64265 --- /dev/null +++ b/recipes/stringzilla/all/conanfile.py @@ -0,0 +1,48 @@ +from conan import ConanFile +from conan.tools.files import get, copy +from conan.tools.layout import basic_layout +from conan.tools.build import check_min_cppstd +import os + +required_conan_version = ">=1.52.0" + +class StringZillaConan(ConanFile): + name = "stringzilla" + description = "Fastest string sort, search, split, and shuffle for long strings and multi-gigabyte files in Python and C, leveraging SIMD with Arm Neon and x86 AVX2 & AVX-512 intrinsics." + license = "Apache-2.0" + url = "https://github.com/conan-io/conan-center-index" + homepage = "https://github.com/ashvardanian/StringZilla/" + topics = ("string", "simd", "sse", "avx", "neon", "header-only") + package_type = "header-library" + settings = "os", "arch", "compiler", "build_type" + no_copy_source = True + + @property + def _min_cppstd(self): + return 11 + + def layout(self): + basic_layout(self, src_folder="src") + + def package_id(self): + self.info.clear() + + def validate(self): + if self.settings.compiler.get_safe("cppstd"): + check_min_cppstd(self, self._min_cppstd) + + def source(self): + get(self, **self.conan_data["sources"][self.version], strip_root=True) + + 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, "stringzilla"), + ) + + def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] diff --git a/recipes/stringzilla/all/test_package/CMakeLists.txt b/recipes/stringzilla/all/test_package/CMakeLists.txt new file mode 100644 index 00000000000000..c0e457af6c08c0 --- /dev/null +++ b/recipes/stringzilla/all/test_package/CMakeLists.txt @@ -0,0 +1,8 @@ +cmake_minimum_required(VERSION 3.15) +project(test_package LANGUAGES CXX) + +find_package(stringzilla REQUIRED CONFIG) + +add_executable(${PROJECT_NAME} test_package.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE stringzilla::stringzilla) +target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/stringzilla/all/test_package/conanfile.py b/recipes/stringzilla/all/test_package/conanfile.py new file mode 100644 index 00000000000000..3a91c9439218e3 --- /dev/null +++ b/recipes/stringzilla/all/test_package/conanfile.py @@ -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 layout(self): + cmake_layout(self) + + def requirements(self): + self.requires(self.tested_reference_str) + + 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, "test_package") + self.run(bin_path, env="conanrun") diff --git a/recipes/stringzilla/all/test_package/test_package.cpp b/recipes/stringzilla/all/test_package/test_package.cpp new file mode 100644 index 00000000000000..6725fc782db3f8 --- /dev/null +++ b/recipes/stringzilla/all/test_package/test_package.cpp @@ -0,0 +1,24 @@ +#include <cstdlib> +#include <iostream> +#include "stringzilla.h" + +int main(void) { + // Initialize your haystack and needle + strzl_haystack_t haystack = { + "Fastest string sort, search, split, " + "and shuffle for long strings and multi-gigabyte files in Python and C, " + "leveraging SIMD with Arm Neon and x86 AVX2 & AVX-512 intrinsics.", + 171}; + strzl_needle_t needle = {"SIMD", 4}; + + // Count occurrences of a character like a boss 😎 + size_t count = strzl_naive_count_char(haystack, 'a'); + + // Find a character like you're searching for treasure 🏴☠️ + size_t position = strzl_naive_find_char(haystack, 'a'); + + // Find a substring like it's Waldo 🕵️♂️ + size_t substring_position = strzl_naive_find_substr(haystack, needle); + + return EXIT_SUCCESS; +} diff --git a/recipes/stringzilla/config.yml b/recipes/stringzilla/config.yml new file mode 100644 index 00000000000000..e1c4f3be249832 --- /dev/null +++ b/recipes/stringzilla/config.yml @@ -0,0 +1,3 @@ +versions: + "1.1.3": + folder: all diff --git a/recipes/taocpp-taopq/all/conanfile.py b/recipes/taocpp-taopq/all/conanfile.py index 4cf5de4b292312..7ea861e1070eaf 100644 --- a/recipes/taocpp-taopq/all/conanfile.py +++ b/recipes/taocpp-taopq/all/conanfile.py @@ -16,7 +16,7 @@ class TaoCPPTaopqConan(ConanFile): homepage = "https://github.com/taocpp/taopq" description = "C++ client library for PostgreSQL" topics = ("cpp17", "postgresql", "libpq", "data-base", "sql") - + package_type = "library" settings = "os", "arch", "build_type", "compiler" options = { "shared": [True, False], @@ -53,7 +53,8 @@ def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("libpq/14.5") + # libpq-fe.h is included by many public headers of taocpp-taopq, and also uses some symbols of the lib (see https://github.com/conan-io/conan-center-index/pull/19825#issuecomment-1720996359) + self.requires("libpq/15.4", transitive_headers=True, transitive_libs=True) def validate(self): if self.settings.compiler.get_safe("cppstd"): diff --git a/recipes/tscns/all/conanfile.py b/recipes/tscns/all/conanfile.py index f9a1b573dbe33f..c1b715cc277477 100644 --- a/recipes/tscns/all/conanfile.py +++ b/recipes/tscns/all/conanfile.py @@ -1,13 +1,14 @@ +import os + from conan import ConanFile from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy from conan.tools.build import check_min_cppstd +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.layout import basic_layout -import os - required_conan_version = ">=1.52.0" + class TscnsConan(ConanFile): name = "tscns" description = "A low overhead nanosecond clock based on x86 TSC" @@ -15,6 +16,7 @@ class TscnsConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/MengRao/tscns/" topics = ("timestamp", "x86_64", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" @property @@ -37,7 +39,7 @@ def validate(self): check_min_cppstd(self, self._min_cppstd) def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): apply_conandata_patches(self) diff --git a/recipes/tscns/all/test_v1_package/CMakeLists.txt b/recipes/tscns/all/test_v1_package/CMakeLists.txt index eebfbab4ba7b5f..0d20897301b68b 100644 --- a/recipes/tscns/all/test_v1_package/CMakeLists.txt +++ b/recipes/tscns/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(tscns REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE tscns::tscns) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/tsl-array-hash/all/conanfile.py b/recipes/tsl-array-hash/all/conanfile.py index 8c6297fe626729..4e37fe94c16996 100644 --- a/recipes/tsl-array-hash/all/conanfile.py +++ b/recipes/tsl-array-hash/all/conanfile.py @@ -14,6 +14,7 @@ class TslArrayHashConan(ConanFile): topics = ("string", "structure", "hash map", "hash set") homepage = "https://github.com/Tessil/array-hash" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -28,8 +29,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -43,7 +43,6 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tsl::array_hash") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "tsl-array-hash" @@ -55,4 +54,3 @@ def package_info(self): self.cpp_info.components["array_hash"].set_property("cmake_target_name", "tsl::array_hash") self.cpp_info.components["array_hash"].bindirs = [] self.cpp_info.components["array_hash"].libdirs = [] - self.cpp_info.components["array_hash"].resdirs = [] diff --git a/recipes/tsl-array-hash/all/test_v1_package/CMakeLists.txt b/recipes/tsl-array-hash/all/test_v1_package/CMakeLists.txt index 15d716d7a95051..0d20897301b68b 100644 --- a/recipes/tsl-array-hash/all/test_v1_package/CMakeLists.txt +++ b/recipes/tsl-array-hash/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(tsl-array-hash REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE tsl::array_hash) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/tsl-hat-trie/all/conanfile.py b/recipes/tsl-hat-trie/all/conanfile.py index fbce5d32f1f2b5..0c2749d1da56d7 100644 --- a/recipes/tsl-hat-trie/all/conanfile.py +++ b/recipes/tsl-hat-trie/all/conanfile.py @@ -14,7 +14,7 @@ class TslHatTrieConan(ConanFile): topics = ("string", "trie", "structure", "hash map", "hash set") homepage = "https://github.com/Tessil/hat-trie" url = "https://github.com/conan-io/conan-center-index" - + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" def layout(self): @@ -31,8 +31,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): rmdir(self, os.path.join(self.source_folder, "include", "tsl", "array-hash")) @@ -48,7 +47,6 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tsl::hat_trie") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "tsl-hat-trie" @@ -61,4 +59,3 @@ def package_info(self): self.cpp_info.components["hat_trie"].set_property("cmake_target_name", "tsl::hat_trie") self.cpp_info.components["hat_trie"].bindirs = [] self.cpp_info.components["hat_trie"].libdirs = [] - self.cpp_info.components["hat_trie"].resdirs = [] diff --git a/recipes/tsl-hat-trie/all/test_v1_package/CMakeLists.txt b/recipes/tsl-hat-trie/all/test_v1_package/CMakeLists.txt index 6a1b5a8c7df69f..0d20897301b68b 100644 --- a/recipes/tsl-hat-trie/all/test_v1_package/CMakeLists.txt +++ b/recipes/tsl-hat-trie/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(tsl-hat-trie REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE tsl::hat_trie) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/tsl-ordered-map/all/conanfile.py b/recipes/tsl-ordered-map/all/conanfile.py index d13b78edda1474..9883b71a12ac38 100644 --- a/recipes/tsl-ordered-map/all/conanfile.py +++ b/recipes/tsl-ordered-map/all/conanfile.py @@ -14,6 +14,7 @@ class TslOrderedMapConan(ConanFile): topics = ("ordered-map", "structure", "hash map", "hash set") homepage = "https://github.com/Tessil/ordered-map" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -28,8 +29,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -43,7 +43,6 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tsl::ordered_map") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "tsl-ordered-map" @@ -55,4 +54,3 @@ def package_info(self): self.cpp_info.components["ordered_map"].set_property("cmake_target_name", "tsl::ordered_map") self.cpp_info.components["ordered_map"].bindirs = [] self.cpp_info.components["ordered_map"].libdirs = [] - self.cpp_info.components["ordered_map"].resdirs = [] diff --git a/recipes/tsl-robin-map/all/conanfile.py b/recipes/tsl-robin-map/all/conanfile.py index 60cfac70c1a0d9..14ac380eaf6917 100644 --- a/recipes/tsl-robin-map/all/conanfile.py +++ b/recipes/tsl-robin-map/all/conanfile.py @@ -14,6 +14,7 @@ class TslRobinMapConan(ConanFile): topics = ("robin-map", "structure", "hash map", "hash set") homepage = "https://github.com/Tessil/robin-map" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -28,8 +29,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -43,7 +43,6 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tsl::robin_map") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "tsl-robin-map" @@ -55,4 +54,3 @@ def package_info(self): self.cpp_info.components["robin_map"].set_property("cmake_target_name", "tsl::robin_map") self.cpp_info.components["robin_map"].bindirs = [] self.cpp_info.components["robin_map"].libdirs = [] - self.cpp_info.components["robin_map"].resdirs = [] diff --git a/recipes/tsl-sparse-map/all/conanfile.py b/recipes/tsl-sparse-map/all/conanfile.py index 4168882cba1a35..9afa37e182a6bf 100644 --- a/recipes/tsl-sparse-map/all/conanfile.py +++ b/recipes/tsl-sparse-map/all/conanfile.py @@ -14,6 +14,7 @@ class TslSparseMapConan(ConanFile): topics = ("sparse-map", "structure", "hash map", "hash set") homepage = "https://github.com/Tessil/sparse-map" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -28,8 +29,7 @@ def validate(self): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -43,7 +43,6 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "tsl::sparse_map") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 once cmake_find_package* generators removed self.cpp_info.filenames["cmake_find_package"] = "tsl-sparse-map" @@ -55,4 +54,3 @@ def package_info(self): self.cpp_info.components["sparse_map"].set_property("cmake_target_name", "tsl::sparse_map") self.cpp_info.components["sparse_map"].bindirs = [] self.cpp_info.components["sparse_map"].libdirs = [] - self.cpp_info.components["sparse_map"].resdirs = [] diff --git a/recipes/tsl-sparse-map/all/test_v1_package/CMakeLists.txt b/recipes/tsl-sparse-map/all/test_v1_package/CMakeLists.txt index 3e681dedd0cd45..0d20897301b68b 100644 --- a/recipes/tsl-sparse-map/all/test_v1_package/CMakeLists.txt +++ b/recipes/tsl-sparse-map/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(tsl-sparse-map REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE tsl::sparse_map) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/tuplet/all/conanfile.py b/recipes/tuplet/all/conanfile.py index e4ef08ece551c8..b8e4521ac33191 100644 --- a/recipes/tuplet/all/conanfile.py +++ b/recipes/tuplet/all/conanfile.py @@ -16,6 +16,7 @@ class TupletConan(ConanFile): homepage = "https://github.com/codeinred/tuplet" description = "A fast, simple tuple implementation that implements tuple as an aggregate" topics = ("tuple", "trivially-copyable", "modern-cpp") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -41,6 +42,9 @@ def _compilers_minimum_version(self): "apple-clang": "12" } + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): self.info.clear() @@ -62,12 +66,8 @@ def loose_lt_semver(v1, v2): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd} which your compiler ({compiler}-{version}) does not support") - def layout(self): - basic_layout(self, src_folder="src") - def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass diff --git a/recipes/uncrustify/all/conanfile.py b/recipes/uncrustify/all/conanfile.py index da8a4d29e3f0e3..0c905f0cb5c350 100644 --- a/recipes/uncrustify/all/conanfile.py +++ b/recipes/uncrustify/all/conanfile.py @@ -16,6 +16,7 @@ class UncrustifyConan(ConanFile): topics = "beautifier", "command-line" homepage = "https://github.com/uncrustify/uncrustify" url = "https://github.com/conan-io/conan-center-index" + package_type = "application" settings = "os", "arch", "compiler", "build_type" def layout(self): @@ -29,8 +30,7 @@ def validate(self): raise ConanInvalidConfiguration(f"{self.ref} requires GCC >=7") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) @@ -65,9 +65,6 @@ def package(self): def package_info(self): self.cpp_info.includedirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] # TODO: to remove in conan v2 - binpath = os.path.join(self.package_folder, "bin") - self.output.info(f"Adding to PATH: {binpath}") - self.env_info.PATH.append(binpath) + self.env_info.PATH.append(os.path.join(self.package_folder, "bin")) diff --git a/recipes/uni-algo/all/conandata.yml b/recipes/uni-algo/all/conandata.yml index 506f983a8dd2c5..0aedc7a70319b1 100644 --- a/recipes/uni-algo/all/conandata.yml +++ b/recipes/uni-algo/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "1.1.0": + url: "https://github.com/uni-algo/uni-algo/archive/v1.1.0.tar.gz" + sha256: "f9aa30df9766fbbc7007b206c6db122313194e75b159dc222cddce016372d2de" "1.0.0": url: "https://github.com/uni-algo/uni-algo/archive/v1.0.0.tar.gz" sha256: "a59d61cd4a4fff08672831c7e5a8c204bb6e96c21506b6471771c01b38958a15" diff --git a/recipes/uni-algo/config.yml b/recipes/uni-algo/config.yml index 9ca04a66695cab..aabd23fca0e2da 100644 --- a/recipes/uni-algo/config.yml +++ b/recipes/uni-algo/config.yml @@ -1,4 +1,6 @@ versions: + "1.1.0": + folder: all "1.0.0": folder: all "0.8.2": diff --git a/recipes/units/all/conanfile.py b/recipes/units/all/conanfile.py index abb3f73f190416..f5e7559e8b3b49 100644 --- a/recipes/units/all/conanfile.py +++ b/recipes/units/all/conanfile.py @@ -2,6 +2,7 @@ from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get +from conan.tools.layout import basic_layout from conan.tools.scm import Version import os @@ -20,6 +21,7 @@ class UnitsConan(ConanFile): "no-dependencies") homepage = "https://github.com/nholthaus/units" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -36,6 +38,9 @@ def _minimum_compilers_version(self): "msvc": "190", } + def layout(self): + basic_layout(self, src_folder="src") + def package_id(self): self.info.clear() @@ -49,8 +54,7 @@ def validate(self): ) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -64,4 +68,3 @@ def package_info(self): self.cpp_info.set_property("cmake_target_name", "units::units") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] diff --git a/recipes/units/all/test_v1_package/CMakeLists.txt b/recipes/units/all/test_v1_package/CMakeLists.txt index b01d1d5fd06ef4..0d20897301b68b 100644 --- a/recipes/units/all/test_v1_package/CMakeLists.txt +++ b/recipes/units/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(units REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE units::units) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_14) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/utf8.h/all/conanfile.py b/recipes/utf8.h/all/conanfile.py index 3c63ca89d61570..5053468bc7039f 100644 --- a/recipes/utf8.h/all/conanfile.py +++ b/recipes/utf8.h/all/conanfile.py @@ -13,6 +13,7 @@ class Utf8HConan(ConanFile): description = "Single header utf8 string functions for C and C++" topics = ("utf8", "unicode", "text") license = "Unlicense" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -23,8 +24,7 @@ def package_id(self): self.info.clear() def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -36,4 +36,3 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] diff --git a/recipes/utf8.h/all/test_v1_package/CMakeLists.txt b/recipes/utf8.h/all/test_v1_package/CMakeLists.txt index e35aca1f7a1353..0d20897301b68b 100644 --- a/recipes/utf8.h/all/test_v1_package/CMakeLists.txt +++ b/recipes/utf8.h/all/test_v1_package/CMakeLists.txt @@ -1,10 +1,8 @@ cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES CXX) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(utf8.h REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE utf8.h::utf8.h) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/v-hacd/all/conanfile.py b/recipes/v-hacd/all/conanfile.py index 0121a2fed52b85..7b0d91b5040841 100644 --- a/recipes/v-hacd/all/conanfile.py +++ b/recipes/v-hacd/all/conanfile.py @@ -16,6 +16,7 @@ class VhacdConan(ConanFile): topics = ("3d", "mesh", "shape", "decomposition", "convex") homepage = "https://github.com/kmammou/v-hacd" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -37,7 +38,7 @@ def package_id(self): def validate(self): if self.settings.compiler.get_safe("cppstd"): - check_min_cppstd(self, 11) + check_min_cppstd(self, self._min_cppstd) minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) if minimum_version and Version(self.settings.compiler.version) < minimum_version: raise ConanInvalidConfiguration( @@ -45,8 +46,7 @@ def validate(self): ) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass diff --git a/recipes/valijson/all/conanfile.py b/recipes/valijson/all/conanfile.py index 4c1f0676480adf..9e8080a170f305 100644 --- a/recipes/valijson/all/conanfile.py +++ b/recipes/valijson/all/conanfile.py @@ -13,6 +13,7 @@ class ValijsonConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/tristanpenman/valijson" topics = ("json", "validator", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -31,7 +32,7 @@ def validate(self): check_min_cppstd(self, self._min_cppstd) def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -46,12 +47,10 @@ def package(self): ) def package_info(self): + self.cpp_info.set_property("cmake_target_name", "ValiJSON::valijson") self.cpp_info.bindirs = [] self.cpp_info.libdirs = [] - self.cpp_info.set_property("cmake_target_name", "ValiJSON::valijson") - self.cpp_info.components["libvalijson"].set_property("cmake_target_name", "ValiJSON::valijson") - # TODO: to remove in conan v2 once cmake_find_package_* generators removed # self.cpp_info.filenames["cmake_find_package"] = "valijson" # TBA: There's no installed config file # self.cpp_info.filenames["cmake_find_package_multi"] = "valijson" # TBA: There's no installed config file @@ -59,3 +58,6 @@ def package_info(self): self.cpp_info.names["cmake_find_package_multi"] = "ValiJSON" self.cpp_info.components["libvalijson"].names["cmake_find_package"] = "valijson" self.cpp_info.components["libvalijson"].names["cmake_find_package_multi"] = "valijson" + self.cpp_info.components["libvalijson"].set_property("cmake_target_name", "ValiJSON::valijson") + self.cpp_info.components["libvalijson"].bindirs = [] + self.cpp_info.components["libvalijson"].libdirs = [] diff --git a/recipes/valijson/all/test_package/CMakeLists.txt b/recipes/valijson/all/test_package/CMakeLists.txt index f283c4c7cf92c1..9fa0294a2d6c6e 100644 --- a/recipes/valijson/all/test_package/CMakeLists.txt +++ b/recipes/valijson/all/test_package/CMakeLists.txt @@ -8,11 +8,11 @@ find_package(RapidJSON REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) target_link_libraries( - ${PROJECT_NAME} - PRIVATE - ValiJSON::valijson - nlohmann_json::nlohmann_json - picojson::picojson - rapidjson + ${PROJECT_NAME} + PRIVATE + ValiJSON::valijson + nlohmann_json::nlohmann_json + picojson::picojson + rapidjson ) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/valijson/all/test_package/conanfile.py b/recipes/valijson/all/test_package/conanfile.py index 44512632f983b5..81b93054985f72 100644 --- a/recipes/valijson/all/test_package/conanfile.py +++ b/recipes/valijson/all/test_package/conanfile.py @@ -12,7 +12,7 @@ def layout(self): cmake_layout(self) def requirements(self): - self.requires("nlohmann_json/3.9.1") + self.requires("nlohmann_json/3.11.2") self.requires("rapidjson/cci.20200410") self.requires("picojson/1.3.0") self.requires(self.tested_reference_str) @@ -25,10 +25,7 @@ def build(self): def test(self): if can_run(self): bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package") - schema_file = os.path.abspath(os.path.join(self.source_folder, "schema.json")) - valid_file = os.path.abspath(os.path.join(self.source_folder, "valid.json")) - invalid_file = os.path.abspath(os.path.join(self.source_folder, "invalid.json")) - self.run( - "{} {} {} {}".format(bin_path, schema_file, valid_file, invalid_file), - run_environment=True - ) + schema_file = os.path.join(self.source_folder, "schema.json") + valid_file = os.path.join(self.source_folder, "valid.json") + invalid_file = os.path.join(self.source_folder, "invalid.json") + self.run(f"{bin_path} {schema_file} {valid_file} {invalid_file}", env="conanrun") diff --git a/recipes/valijson/all/test_v1_package/CMakeLists.txt b/recipes/valijson/all/test_v1_package/CMakeLists.txt index 679bcbb3ab1fd1..a2f6329c538d27 100644 --- a/recipes/valijson/all/test_v1_package/CMakeLists.txt +++ b/recipes/valijson/all/test_v1_package/CMakeLists.txt @@ -11,10 +11,10 @@ find_package(RapidJSON REQUIRED CONFIG) add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) target_link_libraries( - ${PROJECT_NAME} - ValiJSON::valijson - nlohmann_json::nlohmann_json - picojson::picojson - RapidJSON::RapidJSON + ${PROJECT_NAME} + ValiJSON::valijson + nlohmann_json::nlohmann_json + picojson::picojson + RapidJSON::RapidJSON ) target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) diff --git a/recipes/valijson/all/test_v1_package/conanfile.py b/recipes/valijson/all/test_v1_package/conanfile.py index 1ffe3deaeb51c4..f02d6b2bb83203 100644 --- a/recipes/valijson/all/test_v1_package/conanfile.py +++ b/recipes/valijson/all/test_v1_package/conanfile.py @@ -4,7 +4,7 @@ class TestPackageConan(ConanFile): settings = "os", "compiler", "build_type", "arch" - generators = "cmake", "cmake_find_package", "cmake_find_package_multi" + generators = "cmake", "cmake_find_package_multi" def build(self): cmake = CMake(self) @@ -12,17 +12,14 @@ def build(self): cmake.build() def requirements(self): - self.requires("nlohmann_json/3.9.1") + self.requires("nlohmann_json/3.11.2") self.requires("rapidjson/cci.20200410") self.requires("picojson/1.3.0") def test(self): if not tools.cross_building(self.settings): bin_path = os.path.join("bin", "test_package") - schema_file = os.path.abspath(os.path.join(self.source_folder, os.pardir, "test_package", "schema.json")) - valid_file = os.path.abspath(os.path.join(self.source_folder, os.pardir, "test_package", "valid.json")) - invalid_file = os.path.abspath(os.path.join(self.source_folder, os.pardir, "test_package", "invalid.json")) - self.run( - "{} {} {} {}".format(bin_path, schema_file, valid_file, invalid_file), - run_environment=True - ) + schema_file = os.path.join(self.source_folder, os.pardir, "test_package", "schema.json") + valid_file = os.path.join(self.source_folder, os.pardir, "test_package", "valid.json") + invalid_file = os.path.join(self.source_folder, os.pardir, "test_package", "invalid.json") + self.run(f"{bin_path} {schema_file} {valid_file} {invalid_file}", run_environment=True) diff --git a/recipes/vc/all/conanfile.py b/recipes/vc/all/conanfile.py index 7cfaddf7b08382..12e8e45ebe604c 100644 --- a/recipes/vc/all/conanfile.py +++ b/recipes/vc/all/conanfile.py @@ -4,17 +4,17 @@ from conan.tools.files import copy, get, replace_in_file, rmdir import os -required_conan_version = ">=1.51.1" +required_conan_version = ">=1.50.0" class VcConan(ConanFile): name = "vc" description = "SIMD Vector Classes for C++." license = "BSD-3-Clause" - topics = ("vc", "simd", "vectorization", "parallel", "sse", "avx", "neon") + topics = ("simd", "vectorization", "parallel", "sse", "avx", "neon") homepage = "https://github.com/VcDevel/Vc" url = "https://github.com/conan-io/conan-center-index" - + package_type = "static-library" settings = "os", "arch", "compiler", "build_type" options = { "fPIC": [True, False], @@ -31,12 +31,11 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if self.info.settings.compiler.get_safe("cppstd"): + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/vc/all/test_v1_package/CMakeLists.txt b/recipes/vc/all/test_v1_package/CMakeLists.txt index 492877a81dfa86..0d20897301b68b 100644 --- a/recipes/vc/all/test_v1_package/CMakeLists.txt +++ b/recipes/vc/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(Vc REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE Vc::Vc) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/vcglib/all/conanfile.py b/recipes/vcglib/all/conanfile.py index f452d7336181c3..b05d8f64d45598 100644 --- a/recipes/vcglib/all/conanfile.py +++ b/recipes/vcglib/all/conanfile.py @@ -4,7 +4,7 @@ from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get import os -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.53.0" class VcglibConan(ConanFile): @@ -14,7 +14,7 @@ class VcglibConan(ConanFile): topics = ("vcglib", "mesh-processing") homepage = "https://github.com/cnr-isti-vclab/vcglib" url = "https://github.com/conan-io/conan-center-index" - + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -35,24 +35,21 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass + self.options.rm_safe("fPIC") def layout(self): cmake_layout(self, src_folder="src") def requirements(self): - self.requires("eigen/3.4.0") + # vcglib public headers include several eigen headers (for example vcg/math/matrix44.h includes Eigen/Core) + self.requires("eigen/3.4.0", transitive_headers=True) def validate(self): if self.info.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, 11) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/vcglib/all/test_v1_package/CMakeLists.txt b/recipes/vcglib/all/test_v1_package/CMakeLists.txt index 0b93c9e9b9c662..0d20897301b68b 100644 --- a/recipes/vcglib/all/test_v1_package/CMakeLists.txt +++ b/recipes/vcglib/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(vcglib REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE vcglib::vcglib) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/vectorclass/all/conanfile.py b/recipes/vectorclass/all/conanfile.py index 5696b99489d45d..60e6bdcdc723a7 100644 --- a/recipes/vectorclass/all/conanfile.py +++ b/recipes/vectorclass/all/conanfile.py @@ -5,7 +5,7 @@ from conan.tools.files import copy, get import os -required_conan_version = ">=1.51.1" +required_conan_version = ">=1.50.0" class VectorclassConan(ConanFile): @@ -18,7 +18,7 @@ class VectorclassConan(ConanFile): topics = ("vectorclass", "vector", "simd") homepage = "https://github.com/vectorclass/version2" url = "https://github.com/conan-io/conan-center-index" - + package_type = "static-library" settings = "os", "arch", "compiler", "build_type" options = { "fPIC": [True, False], @@ -37,6 +37,7 @@ def _min_cppstd(self): def _compilers_minimum_version(self): return { "Visual Studio": "15.7", + "msvc": "191", "gcc": "7", "clang": "4.0", "apple-clang": "9.1", @@ -50,10 +51,10 @@ def layout(self): cmake_layout(self, src_folder="src") def validate(self): - if self.info.settings.os not in ["Linux", "Windows", "Macos"] or self.info.settings.arch not in ["x86", "x86_64"]: + if self.settings.os not in ["Linux", "Windows", "Macos"] or self.settings.arch not in ["x86", "x86_64"]: raise ConanInvalidConfiguration("vectorclass supports Linux/Windows/macOS and x86/x86_64 only.") - if self.info.settings.compiler.get_safe("cppstd"): + if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) def loose_lt_semver(v1, v2): @@ -62,15 +63,14 @@ def loose_lt_semver(v1, v2): min_length = min(len(lv1), len(lv2)) return lv1[:min_length] < lv2[:min_length] - minimum_version = self._compilers_minimum_version.get(str(self.info.settings.compiler), False) - if minimum_version and loose_lt_semver(str(self.info.settings.compiler.version), minimum_version): + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and loose_lt_semver(str(self.settings.compiler.version), minimum_version): raise ConanInvalidConfiguration( f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not support.", ) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/vectorclass/all/test_v1_package/CMakeLists.txt b/recipes/vectorclass/all/test_v1_package/CMakeLists.txt index 1d531c5d5a9305..0d20897301b68b 100644 --- a/recipes/vectorclass/all/test_v1_package/CMakeLists.txt +++ b/recipes/vectorclass/all/test_v1_package/CMakeLists.txt @@ -1,11 +1,8 @@ -cmake_minimum_required(VERSION 3.8) -project(test_package LANGUAGES CXX) +cmake_minimum_required(VERSION 3.1) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(vectorclass REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE vectorclass::vectorclass) -target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_17) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/vectorial/all/conanfile.py b/recipes/vectorial/all/conanfile.py index fd7818ff4d997d..91f7fd34d7f37f 100644 --- a/recipes/vectorial/all/conanfile.py +++ b/recipes/vectorial/all/conanfile.py @@ -13,18 +13,18 @@ class VectorialConan(ConanFile): license = "BSD-2-Clause" homepage = "https://github.com/scoopr/vectorial" url = "https://github.com/conan-io/conan-center-index" + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True - def package_id(self): - self.info.clear() - def layout(self): basic_layout(self, src_folder="src") + def package_id(self): + self.info.clear() + def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass @@ -35,8 +35,6 @@ def package(self): def package_info(self): self.cpp_info.bindirs = [] - self.cpp_info.frameworkdirs = [] self.cpp_info.libdirs = [] - self.cpp_info.resdirs = [] if self.settings.os in ["Linux", "FreeBSD"]: self.cpp_info.system_libs = ["m"] diff --git a/recipes/vectorial/all/test_package/conanfile.py b/recipes/vectorial/all/test_package/conanfile.py index d120a992c06a69..0a6bc68712d901 100644 --- a/recipes/vectorial/all/test_package/conanfile.py +++ b/recipes/vectorial/all/test_package/conanfile.py @@ -7,13 +7,14 @@ class TestPackageConan(ConanFile): settings = "os", "arch", "compiler", "build_type" generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv" - - def requirements(self): - self.requires(self.tested_reference_str) + test_type = "explicit" def layout(self): cmake_layout(self) + def requirements(self): + self.requires(self.tested_reference_str) + def build(self): cmake = CMake(self) cmake.configure() diff --git a/recipes/vectorial/all/test_v1_package/CMakeLists.txt b/recipes/vectorial/all/test_v1_package/CMakeLists.txt index 394022f35f7caf..0d20897301b68b 100644 --- a/recipes/vectorial/all/test_v1_package/CMakeLists.txt +++ b/recipes/vectorial/all/test_v1_package/CMakeLists.txt @@ -1,10 +1,8 @@ cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES CXX) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(vectorial REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.cpp) -target_link_libraries(${PROJECT_NAME} PRIVATE vectorial::vectorial) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/wasmtime/all/conandata.yml b/recipes/wasmtime/all/conandata.yml index 59e975128a2ee3..c449ffc3965a66 100644 --- a/recipes/wasmtime/all/conandata.yml +++ b/recipes/wasmtime/all/conandata.yml @@ -1,4 +1,34 @@ sources: + "12.0.2": + Windows: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-x86_64-windows-c-api.zip" + sha256: "ad589d69722f0fdf0b6900fe1c708194575c487776504c44a5283c2960c03a92" + MinGW: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-x86_64-mingw-c-api.zip" + sha256: "773737d9072aed6efdbb6c8137561bd3d5e271008e6741687fa504ec384d0799" + Linux: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-x86_64-linux-c-api.tar.xz" + sha256: "9e02cd4201d74c68a236664f883873335c7427e820ce4a44c47c1cc98ec9e553" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-aarch64-linux-c-api.tar.xz" + sha256: "daf6ca147b288cf915978f064853f403ca163b52806ae0a52ddd5bd91a5a2507" + "s390x": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-s390x-linux-c-api.tar.xz" + sha256: "65e75ffe34ced6710b56da071e9eb734eabdad69be07f3e6baae27e6b1a95d41" + Macos: + "x86_64": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-x86_64-macos-c-api.tar.xz" + sha256: "35a0d3590afb147f9b312820df87189a9a376cc5bddc2d90b8d7e57b412c7dc6" + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-aarch64-macos-c-api.tar.xz" + sha256: "6b8a13fbe6c5440b30632a1f9178df1cdc07bbf34633a105666e506bc8db941d" + Android: + "armv8": + url: "https://github.com/bytecodealliance/wasmtime/releases/download/v12.0.2/wasmtime-v12.0.2-aarch64-linux-c-api.tar.xz" + sha256: "daf6ca147b288cf915978f064853f403ca163b52806ae0a52ddd5bd91a5a2507" "12.0.1": Windows: "x86_64": diff --git a/recipes/wasmtime/config.yml b/recipes/wasmtime/config.yml index de77d1db49a4f3..e5ce53b819caaf 100644 --- a/recipes/wasmtime/config.yml +++ b/recipes/wasmtime/config.yml @@ -1,4 +1,6 @@ versions: + "12.0.2": + folder: all "12.0.1": folder: all "9.0.1": diff --git a/recipes/wildmidi/all/conanfile.py b/recipes/wildmidi/all/conanfile.py index 0e6c15d33a72bd..4648d8d359fa37 100644 --- a/recipes/wildmidi/all/conanfile.py +++ b/recipes/wildmidi/all/conanfile.py @@ -15,6 +15,7 @@ class WildmidiConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://www.mindwerks.net/projects/wildmidi" topics = ("audio", "midi", "multimedia", "music", "softsynth", "sound", "synth") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -72,10 +73,10 @@ def package_info(self): if is_msvc(self): libname = "libWildMidi" if not self.options.shared: - libname += "-static" + libname += "-static" else: libname = "WildMidi" - + self.cpp_info.set_property("cmake_file_name", "WildMidi") self.cpp_info.set_property("cmake_target_name", "WildMidi::libwildmidi") self.cpp_info.set_property("pkg_config_name", "wildmidi") @@ -92,3 +93,5 @@ def package_info(self): self.cpp_info.names["cmake_find_package_multi"] = "WildMidi" self.cpp_info.components["libwildmidi"].names["cmake_find_package"] = "libwildmidi" self.cpp_info.components["libwildmidi"].names["cmake_find_package_multi"] = "libwildmidi" + self.cpp_info.components["libwildmidi"].set_property("cmake_target_name", "WildMidi::libwildmidi") + self.cpp_info.components["libwildmidi"].set_property("pkg_config_name", "wildmidi") diff --git a/recipes/winmd/all/conanfile.py b/recipes/winmd/all/conanfile.py index 1882e7a4ae7032..e37dc1cc239fe2 100644 --- a/recipes/winmd/all/conanfile.py +++ b/recipes/winmd/all/conanfile.py @@ -5,10 +5,10 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import copy, get from conan.tools.layout import basic_layout +from conan.tools.microsoft import is_msvc from conan.tools.scm import Version -from conan.tools.microsoft import is_msvc, check_min_vs -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.50.0" class WinMDConan(ConanFile): @@ -18,6 +18,7 @@ class WinMDConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/microsoft/winmd" topics = ("native", "C++", "WinRT", "WinMD") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -30,7 +31,9 @@ def _compilers_minimum_version(self): return { "gcc": "8", "clang": "12", - "apple-clang": "12.0", + "apple-clang": "12", + "Visual Studio": "15", + "msvc": "191", } def layout(self): @@ -40,20 +43,17 @@ def package_id(self): self.info.clear() def validate(self): - # FIXME: `self.settings` is not available in 2.0 but there are plenty of open issues about - # the migration point. For now we are only going to write valid 1.x recipes until we have a proper answer if self.settings.compiler.get_safe("cppstd"): check_min_cppstd(self, self._min_cppstd) - check_min_vs(self, 191) - if not is_msvc(self): - minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) - if minimum_version and Version(self.settings.compiler.version) < minimum_version: - raise ConanInvalidConfiguration( - f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not (fully) support." - ) + + minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False) + if minimum_version and Version(self.settings.compiler.version) < minimum_version: + raise ConanInvalidConfiguration( + f"{self.ref} requires C++{self._min_cppstd}, which your compiler does not (fully) support." + ) def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder) @@ -65,6 +65,8 @@ def package(self): ) def package_info(self): + self.cpp_info.bindirs = [] + self.cpp_info.libdirs = [] if not is_msvc(self): # ignore shadowing errors - self.cpp_info.cppflags = ['-fpermissive'] + self.cpp_info.cxxflags = ['-fpermissive'] diff --git a/recipes/xorstr/all/conanfile.py b/recipes/xorstr/all/conanfile.py index 2712a05ac70441..f5d66df51bfdbb 100644 --- a/recipes/xorstr/all/conanfile.py +++ b/recipes/xorstr/all/conanfile.py @@ -15,8 +15,9 @@ class XorstrConan(ConanFile): topics = ("encryption", "string", "vectorized") homepage = "https://github.com/JustasMasiulis/xorstr" url = "https://github.com/conan-io/conan-center-index" - no_copy_source = True + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True @property def _min_cppstd(self): @@ -55,8 +56,7 @@ def loose_lt_semver(v1, v2): ) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass diff --git a/recipes/xpack/all/conanfile.py b/recipes/xpack/all/conanfile.py index 87dad9562235b8..fb4f7dbe93adb5 100644 --- a/recipes/xpack/all/conanfile.py +++ b/recipes/xpack/all/conanfile.py @@ -1,6 +1,6 @@ from conan import ConanFile from conan.tools.build import check_min_cppstd -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy +from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get from conan.tools.layout import basic_layout import os @@ -13,6 +13,7 @@ class XpackConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/xyz347/xpack" topics = ("json", "bson", "reflection", "xml", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -27,8 +28,8 @@ def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("rapidjson/cci.20220822", transitive_headers=True) - self.requires("rapidxml/1.13", transitive_headers=True) + self.requires("rapidjson/cci.20220822") + self.requires("rapidxml/1.13") def package_id(self): self.info.clear() diff --git a/recipes/xproperty/all/conanfile.py b/recipes/xproperty/all/conanfile.py index f3db566cfff6d7..e6eeff282118e6 100644 --- a/recipes/xproperty/all/conanfile.py +++ b/recipes/xproperty/all/conanfile.py @@ -15,8 +15,9 @@ class XpropertyConan(ConanFile): topics = ("observer", "traitlets") homepage = "https://github.com/jupyter-xeus/xproperty" url = "https://github.com/conan-io/conan-center-index" - no_copy_source = True + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" + no_copy_source = True def layout(self): basic_layout(self, src_folder="src") @@ -32,8 +33,7 @@ def validate(self): check_min_cppstd(self, 14) def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def build(self): pass diff --git a/recipes/xtensor/all/conandata.yml b/recipes/xtensor/all/conandata.yml index 40af805ba9e936..ab5f555ceae44f 100644 --- a/recipes/xtensor/all/conandata.yml +++ b/recipes/xtensor/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.24.6": + url: "https://github.com/xtensor-stack/xtensor/archive/0.24.6.tar.gz" + sha256: "f87259b51aabafdd1183947747edfff4cff75d55375334f2e81cee6dc68ef655" "0.24.3": url: "https://github.com/xtensor-stack/xtensor/archive/0.24.3.tar.gz" sha256: "3acde856b9fb8cf4e2a7b66726da541275d40ab9b002e618ad985ab97f08ca4f" diff --git a/recipes/xtensor/config.yml b/recipes/xtensor/config.yml index 0077748f19ef00..414a96bb9536c9 100644 --- a/recipes/xtensor/config.yml +++ b/recipes/xtensor/config.yml @@ -1,4 +1,6 @@ versions: + "0.24.6": + folder: all "0.24.3": folder: all "0.24.2": diff --git a/recipes/yyjson/all/conandata.yml b/recipes/yyjson/all/conandata.yml index 35f28ce479a2e9..ad21b483cb8407 100644 --- a/recipes/yyjson/all/conandata.yml +++ b/recipes/yyjson/all/conandata.yml @@ -1,4 +1,7 @@ sources: + "0.8.0": + url: "https://github.com/ibireme/yyjson/archive/refs/tags/0.8.0.tar.gz" + sha256: "b2e39ac4c65f9050820c6779e6f7dd3c0d3fed9c6667f91caec0badbedce00f3" "0.7.0": url: "https://github.com/ibireme/yyjson/archive/refs/tags/0.7.0.tar.gz" sha256: "9b91ee48ac1fe5939f747d49f123d9a522b5f4e1e46165c1871936d583628a06" diff --git a/recipes/yyjson/config.yml b/recipes/yyjson/config.yml index 7a6fcce01199cc..f84f2efec202bb 100644 --- a/recipes/yyjson/config.yml +++ b/recipes/yyjson/config.yml @@ -1,4 +1,6 @@ versions: + "0.8.0": + folder: all "0.7.0": folder: all "0.6.0": diff --git a/recipes/zopfli/all/conanfile.py b/recipes/zopfli/all/conanfile.py index 1f0b88e5124353..35dd2870f9a777 100644 --- a/recipes/zopfli/all/conanfile.py +++ b/recipes/zopfli/all/conanfile.py @@ -4,7 +4,7 @@ from conan.tools.scm import Version import os -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.53.0" class ZopfliConan(ConanFile): @@ -16,8 +16,8 @@ class ZopfliConan(ConanFile): "Zopfli Compression Algorithm is a compression library programmed in C " "to perform very good, but slow, deflate or zlib compression." ) - topics = ("zopfli", "compression", "deflate", "gzip", "zlib") - + topics = ("compression", "deflate", "gzip", "zlib") + package_type = "library" settings = "os", "arch", "compiler", "build_type" options = { "shared": [True, False], @@ -34,25 +34,15 @@ def config_options(self): def configure(self): if self.options.shared: - try: - del self.options.fPIC - except Exception: - pass - try: - del self.settings.compiler.libcxx - except Exception: - pass - try: - del self.settings.compiler.cppstd - except Exception: - pass + self.options.rm_safe("fPIC") + self.settings.rm_safe("compiler.cppstd") + self.settings.rm_safe("compiler.libcxx") def layout(self): cmake_layout(self, src_folder="src") def source(self): - get(self, **self.conan_data["sources"][self.version], - destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def generate(self): tc = CMakeToolchain(self) diff --git a/recipes/zopfli/all/test_v1_package/CMakeLists.txt b/recipes/zopfli/all/test_v1_package/CMakeLists.txt index 0d2662cb23a483..0d20897301b68b 100644 --- a/recipes/zopfli/all/test_v1_package/CMakeLists.txt +++ b/recipes/zopfli/all/test_v1_package/CMakeLists.txt @@ -1,10 +1,8 @@ cmake_minimum_required(VERSION 3.1) -project(test_package LANGUAGES C) +project(test_package) include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake) conan_basic_setup(TARGETS) -find_package(Zopfli REQUIRED CONFIG) - -add_executable(${PROJECT_NAME} ../test_package/test_package.c) -target_link_libraries(${PROJECT_NAME} PRIVATE Zopfli::libzopfli) +add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package + ${CMAKE_CURRENT_BINARY_DIR}/test_package) diff --git a/recipes/zpp_throwing/all/conanfile.py b/recipes/zpp_throwing/all/conanfile.py index 6cfaa18e3dd020..7fb36897fcbae1 100644 --- a/recipes/zpp_throwing/all/conanfile.py +++ b/recipes/zpp_throwing/all/conanfile.py @@ -3,11 +3,12 @@ from conan.tools.build import check_min_cppstd from conan.tools.files import get, copy from conan.tools.layout import basic_layout -from conan.tools.scm import Version from conan.tools.microsoft import is_msvc +from conan.tools.scm import Version import os -required_conan_version = ">=1.52.0" +required_conan_version = ">=1.50.0" + class ZppThrowingConan(ConanFile): name = "zpp_throwing" @@ -16,6 +17,7 @@ class ZppThrowingConan(ConanFile): url = "https://github.com/conan-io/conan-center-index" homepage = "https://github.com/eyalz800/zpp_throwing" topics = ("coroutines", "exceptions", "header-only") + package_type = "header-library" settings = "os", "arch", "compiler", "build_type" no_copy_source = True @@ -67,7 +69,7 @@ def loose_lt_semver(v1, v2): raise ConanInvalidConfiguration(f"{self.ref} requires libc++ with 'coroutines' supported on your compiler.") def source(self): - get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True) + get(self, **self.conan_data["sources"][self.version], strip_root=True) def package(self): copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)