From 45111c259f8be8264769d4174e9faa7bb1a7a9f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Abril=20Rinc=C3=B3n=20Blanco?= Date: Mon, 16 Sep 2024 11:56:54 +0200 Subject: [PATCH] Cleanup, pin dependencies --- recipes/melon/all/conanfile.py | 13 ++++--------- recipes/melon/all/test_package/CMakeLists.txt | 5 +---- recipes/melon/all/test_package/test_package.cpp | 2 +- 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/recipes/melon/all/conanfile.py b/recipes/melon/all/conanfile.py index 8251aea3e522e..0d83d36ecc529 100644 --- a/recipes/melon/all/conanfile.py +++ b/recipes/melon/all/conanfile.py @@ -1,7 +1,7 @@ from conan import ConanFile from conan.errors import ConanInvalidConfiguration from conan.tools.build import check_min_cppstd -from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get +from conan.tools.files import copy, get from conan.tools.layout import basic_layout from conan.tools.scm import Version import os @@ -34,15 +34,12 @@ def _compilers_minimum_version(self): "Visual Studio": "17", } - def export_sources(self): - export_conandata_patches(self) - def layout(self): basic_layout(self, src_folder="src") def requirements(self): - self.requires("range-v3/[>=0.11.0]") - self.requires("fmt/[>=10.0.0]") + self.requires("range-v3/0.12.0") + self.requires("fmt/10.2.1") def package_id(self): self.info.clear() @@ -59,10 +56,8 @@ def validate(self): def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) - # Not mandatory when there is no patch, but will suppress warning message about missing build() method def build(self): - # The attribute no_copy_source should not be used when applying patches in build - apply_conandata_patches(self) + pass def package(self): copy(self, "LICENSE", self.source_folder, os.path.join(self.package_folder, "licenses")) diff --git a/recipes/melon/all/test_package/CMakeLists.txt b/recipes/melon/all/test_package/CMakeLists.txt index fbed126ed191d..17e2b8206c6aa 100644 --- a/recipes/melon/all/test_package/CMakeLists.txt +++ b/recipes/melon/all/test_package/CMakeLists.txt @@ -1,11 +1,8 @@ cmake_minimum_required(VERSION 3.15) -# project(test_package LANGUAGES C) # if the project is pure C -project(test_package LANGUAGES CXX) # if the project uses c++ +project(test_package LANGUAGES CXX) find_package(melon REQUIRED CONFIG) add_executable(${PROJECT_NAME} test_package.cpp) -# don't link to ${CONAN_LIBS} or CONAN_PKG::package target_link_libraries(${PROJECT_NAME} PRIVATE melon::melon) -# In case the target project need a specific C++ standard target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_20) diff --git a/recipes/melon/all/test_package/test_package.cpp b/recipes/melon/all/test_package/test_package.cpp index bff007b231748..f0417c2d7cc52 100644 --- a/recipes/melon/all/test_package/test_package.cpp +++ b/recipes/melon/all/test_package/test_package.cpp @@ -44,4 +44,4 @@ int main(int argc, char *argv[]) if (std::ranges::find(path, 8u) == path.end()) return EXIT_FAILURE; return EXIT_SUCCESS; -} \ No newline at end of file +}