Skip to content

Commit

Permalink
ccache: Added version range on fmt (#26297)
Browse files Browse the repository at this point in the history
* Added version range on fmt

* amend test_package

---------

Co-authored-by: Luis Caro Campos <[email protected]>
  • Loading branch information
perseoGI and jcar87 authored Jan 3, 2025
1 parent 7cf3f2e commit 3a61044
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
11 changes: 3 additions & 8 deletions recipes/ccache/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from conan.tools.microsoft import check_min_vs, is_msvc
import os

required_conan_version = ">=1.55.0"
required_conan_version = ">=2.0.9"


class CcacheConan(ConanFile):
Expand Down Expand Up @@ -51,12 +51,11 @@ def requirements(self):
self.requires("hiredis/1.1.0")

if Version(self.version) >= "4.10":
self.requires("fmt/10.2.1")
self.requires("fmt/[>=10.2.1 <=11.1.1]") # Explicitly tested with all versions in this range
self.requires("xxhash/[~0.8]")

def validate(self):
if self.settings.compiler.cppstd:
check_min_cppstd(self, self._min_cppstd)
check_min_cppstd(self, self._min_cppstd)
check_min_vs(self, 192)
if not is_msvc(self):
minimum_version = self._compilers_minimum_version.get(str(self.settings.compiler), False)
Expand Down Expand Up @@ -117,7 +116,3 @@ def package(self):
def package_info(self):
self.cpp_info.libdirs = []
self.cpp_info.includedirs = []

bin_path = os.path.join(self.package_folder, "bin")
self.output.info("Appending PATH environment variable: {}".format(bin_path))
self.env_info.PATH.append(bin_path)
8 changes: 3 additions & 5 deletions recipes/ccache/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@

class TestPackageConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
generators = "VirtualBuildEnv"
test_type = "explicit"

def build_requirements(self):
self.tool_requires(self.tested_reference_str)
def requirements(self):
self.requires(self.tested_reference_str)

def test(self):
if can_run(self):
self.run("ccache --version")
self.run("ccache --version", env="conanrun")

0 comments on commit 3a61044

Please sign in to comment.