Skip to content

simple_enum: add new version 0.8.11 #26028

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions recipes/simple_enum/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"0.8.11":
url: "https://github.com/arturbac/simple_enum/archive/refs/tags/v0.8.11.tar.gz"
sha256: "dae600d9baf3698ec2b9efe9a7ed2f8a417a7b665a841881fcf97e536c68dfac"
"0.8.0":
url: "https://github.com/arturbac/simple_enum/archive/refs/tags/v0.8.0.tar.gz"
sha256: "b32e723ddb29b6cb2ab93f2376157ee6fd7a4f3c170edddb6a3fb7186068e6ee"
33 changes: 9 additions & 24 deletions recipes/simple_enum/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.files import 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

required_conan_version = ">=1.52.0"
required_conan_version = ">=2.0.9"

class SimpleEnumConan(ConanFile):
name = "simple_enum"
Expand All @@ -21,35 +20,19 @@ class SimpleEnumConan(ConanFile):

@property
def _min_cppstd(self):
return 20

@property
def _compilers_minimum_version(self):
return {
"gcc": "11",
"clang": "12",
"apple-clang": "14", # apple-clang/13 doesn't support std::convertible_to
"Visual Studio": "16",
"msvc": "192",
}

def export_sources(self):
export_conandata_patches(self)
return 23 if Version(self.version) >= "0.8.4" else 17

def layout(self):
basic_layout(self, src_folder="src")

def requirements(self):
self.requires("glaze/4.0.1")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the public headers of simple_enum dont make any references to glaze whatsoever - in the codebase it seems like its used only in examples and tests, but not the actual header library. it's documented as being opt-in by the end user, to include both, so I'm not sure if this is required here


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."
)
check_min_cppstd(self, self._min_cppstd)

def source(self):
get(self, **self.conan_data["sources"][self.version], strip_root=True)
Expand All @@ -72,3 +55,5 @@ def package(self):
def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []

self.cpp_info.defines.append("SIMPLE_ENUM_GLZ_3_1_x")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may be missing something here, where does this come from?
I can't find references in https://github.dev/arturbac/simple_enum/tree/v0.8.11

2 changes: 2 additions & 0 deletions recipes/simple_enum/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
versions:
"0.8.11":
folder: all
"0.8.0":
folder: all