Skip to content

Commit

Permalink
Add minimal standard version check to conanfile.py
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
Morwenn committed Sep 30, 2020
1 parent 27da46b commit b168400
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ class CppSortConan(ConanFile):
no_copy_source = True
settings = "os", "compiler", "build_type", "arch"

def configure(self):
if self.settings.get_safe("compiler.cppstd"):
tools.check_min_cppstd(self, 14)

def package(self):
# Install with CMake
cmake = CMake(self)
Expand All @@ -35,8 +39,8 @@ def package(self):
cmake.patch_config_paths()

# Copy license files
self.copy("LICENSE.txt", dst="licenses")
self.copy("NOTICE.txt", dst="licenses")
for file in ["LICENSE.txt", "NOTICE.txt"]:
self.copy(file, dst="licenses")

def package_id(self):
self.info.header_only()

0 comments on commit b168400

Please sign in to comment.