Skip to content

Commit

Permalink
Updates according the comments in review conan-io#5
Browse files Browse the repository at this point in the history
  • Loading branch information
redradist committed Jul 10, 2021
1 parent dddb52d commit f31ed24
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions recipes/wasmtime/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _minimum_compilers_version(self):
"Visual Studio": "15",
"apple-clang": "9.4",
"clang": "3.3",
"gcc": "4.9.4"
"gcc": "4.9"
}

def config_options(self):
Expand All @@ -51,11 +51,18 @@ def configure(self):
def validate(self):
compiler = self.settings.compiler
min_version = self._minimum_compilers_version[str(compiler)]
if tools.Version(compiler.version) < min_version:
try:
if tools.Version(compiler.version) < min_version:
msg = (
"{} requires C{} features which are not supported by compiler {} {} !!"
).format(self.name, self._minimum_cpp_standard, compiler, compiler.version)
raise ConanInvalidConfiguration(msg)
except KeyError:
msg = (
"{} requires C{} features which are not supported by compiler {} {} !!"
).format(self.name, self._minimum_cpp_standard, compiler, compiler.version)
raise ConanInvalidConfiguration(msg)
"{} recipe lacks information about the {} compiler, "
"support for the required C++{} features is assumed"
).format(self.name, compiler, self._minimum_cpp_standard)
self.output.warn(msg)

if (not (self.version in self.conan_data["sources"]) or
not (str(self.settings.os) in self.conan_data["sources"][self.version]) or
Expand Down

0 comments on commit f31ed24

Please sign in to comment.