Skip to content

Commit

Permalink
(#19618) cn-cbor: remove invalid check_min_cppstd
Browse files Browse the repository at this point in the history
* cn-cbor: add version cci.20200822, remove invalid check_min_cppstd

* Update recipes/cn-cbor/all/conandata.yml

* Update recipes/cn-cbor/config.yml

---------

Co-authored-by: Francisco Ramírez <franchuti688@gmail.com>
  • Loading branch information
valgur and franramirez688 authored Mar 7, 2024
1 parent 6965eaa commit f885060
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions recipes/cn-cbor/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
sources:
"1.0.0":
sha256: eca2bcc15b8400037fd95748724287afbb966e34d4d0275a496b4872bcea9d77
url: https://github.com/jimsch/cn-cbor/archive/1.0.0.zip
url: "https://github.com/jimsch/cn-cbor/archive/1.0.0.zip"
sha256: "eca2bcc15b8400037fd95748724287afbb966e34d4d0275a496b4872bcea9d77"
21 changes: 13 additions & 8 deletions recipes/cn-cbor/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.files import copy, get, rmdir

Expand Down Expand Up @@ -42,8 +41,6 @@ def layout(self):
cmake_layout(self, src_folder="src")

def validate(self):
if self.settings.compiler.get_safe("cppstd"):
check_min_cppstd(self, 11)
if self.settings.os == "Windows" and self.options.shared:
raise ConanInvalidConfiguration("Windows shared builds are not supported right now")

Expand All @@ -52,10 +49,16 @@ def source(self):

def generate(self):
tc = CMakeToolchain(self)
tc.variables["fatal_warnings"] = False
tc.variables["coveralls"] = False
tc.variables["build_tests"] = False
tc.variables["build_docs"] = False
tc.variables["CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS"] = self.options.shared
tc.cache_variables["CN_CBOR_FATAL_WARNINGS"] = False
tc.cache_variables["CN_CBOR_COVERALLS"] = False
tc.cache_variables["CN_CBOR_BUILD_TESTS"] = False
tc.cache_variables["CN_CBOR_BUILD_DOCS"] = False
# For v1.0.0
tc.cache_variables["fatal_warnings"] = False
tc.cache_variables["coveralls"] = False
tc.cache_variables["build_tests"] = False
tc.cache_variables["build_docs"] = False
tc.generate()

def build(self):
Expand All @@ -64,7 +67,9 @@ def build(self):
cmake.build()

def package(self):
copy(self, "LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, "LICENSE",
dst=os.path.join(self.package_folder, "licenses"),
src=self.source_folder)
cmake = CMake(self)
cmake.install()
os.remove(os.path.join(self.package_folder, "README.md"))
Expand Down
2 changes: 1 addition & 1 deletion recipes/cn-cbor/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

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

def requirements(self):
Expand Down
1 change: 0 additions & 1 deletion recipes/cn-cbor/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
---
versions:
"1.0.0":
folder: "all"

0 comments on commit f885060

Please sign in to comment.