Skip to content

Commit

Permalink
(#24143) approvaltests.cpp: add 10.13.0
Browse files Browse the repository at this point in the history
* approvaltests.cpp: add 10.13.0

* Minor recipe improvements

---------

Co-authored-by: Rubén Rincón Blanco <[email protected]>
  • Loading branch information
claremacrae and AbrilRBS authored May 28, 2024
1 parent 289b9b5 commit 950d544
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
5 changes: 5 additions & 0 deletions recipes/approvaltests.cpp/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
sources:
"10.13.0":
- url: https://github.com/approvals/ApprovalTests.cpp/releases/download/v.10.13.0/ApprovalTests.v.10.13.0.hpp
sha256: c00f6390b81d9924dc646e9d32b61e1e09abda106c13704f714ac349241bb9ff
- url: "https://raw.githubusercontent.com/approvals/ApprovalTests.cpp/v.10.13.0/LICENSE"
sha256: c71d239df91726fc519c6eb72d318ec65820627232b2f796219e87dcf35d0ab4
"10.12.2":
- url: https://github.com/approvals/ApprovalTests.cpp/releases/download/v.10.12.2/ApprovalTests.v.10.12.2.hpp
sha256: 4c43d0ea98669e3d6fbb5810cc47b19adaf88cabb1421b488aa306b08c434131
Expand Down
10 changes: 9 additions & 1 deletion recipes/approvaltests.cpp/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.files import copy, download, rename
from conan.tools.layout import basic_layout
from conan.tools.scm import Version
import os

required_conan_version = ">=1.51.1"
required_conan_version = ">=1.53"


class ApprovalTestsCppConan(ConanFile):
Expand Down Expand Up @@ -38,6 +39,10 @@ class ApprovalTestsCppConan(ConanFile):
@property
def _header_file(self):
return "ApprovalTests.hpp"

@property
def _min_cppstd(self):
return 11

def config_options(self):
if Version(self.version) < "10.4.0":
Expand All @@ -62,6 +67,9 @@ def package_id(self):
self.info.clear()

def validate(self):
if self.settings.get_safe("compiler.cppstd"):
check_min_cppstd(self, self._min_cppstd)

if Version(self.version) >= "10.2.0":
if self.settings.compiler == "gcc" and Version(self.settings.compiler.version) < "5":
raise ConanInvalidConfiguration(f"{self.ref} with compiler gcc requires at least compiler version 5")
Expand Down
2 changes: 2 additions & 0 deletions recipes/approvaltests.cpp/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"10.13.0":
folder: all
"10.12.2":
folder: all
"10.12.1":
Expand Down

0 comments on commit 950d544

Please sign in to comment.