mirror of
https://github.com/mpusz/mp-units.git
synced 2025-08-05 05:04:27 +02:00
build: MSVC update is not checked in validate()
anymore
This commit is contained in:
19
conanfile.py
19
conanfile.py
@@ -74,18 +74,7 @@ class MPUnitsConan(ConanFile):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def _minimum_compilers_version(self):
|
def _minimum_compilers_version(self):
|
||||||
return {"gcc": "10.3", "clang": "12", "apple-clang": "13", "msvc": "1928"}
|
return {"gcc": "10.3", "clang": "12", "apple-clang": "13", "msvc": "192"}
|
||||||
|
|
||||||
@property
|
|
||||||
def _full_compiler_version(self):
|
|
||||||
compiler = self.settings.compiler
|
|
||||||
if compiler == "msvc":
|
|
||||||
if compiler.update:
|
|
||||||
return int(f"{compiler.version}{compiler.update}")
|
|
||||||
else:
|
|
||||||
return int(f"{compiler.version}0")
|
|
||||||
else:
|
|
||||||
return compiler.version
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def _build_all(self):
|
def _build_all(self):
|
||||||
@@ -142,11 +131,9 @@ class MPUnitsConan(ConanFile):
|
|||||||
|
|
||||||
compiler = self.settings.compiler
|
compiler = self.settings.compiler
|
||||||
min_version = self._minimum_compilers_version.get(str(compiler))
|
min_version = self._minimum_compilers_version.get(str(compiler))
|
||||||
if min_version and loose_lt_semver(
|
if min_version and loose_lt_semver(str(compiler.version), min_version):
|
||||||
str(self._full_compiler_version), min_version
|
|
||||||
):
|
|
||||||
raise ConanInvalidConfiguration(
|
raise ConanInvalidConfiguration(
|
||||||
f"{self.ref} requires at least {compiler} {min_version} ({self._full_compiler_version} in use)"
|
f"{self.ref} requires at least {compiler} {min_version} ({compiler.version} in use)"
|
||||||
)
|
)
|
||||||
|
|
||||||
def layout(self):
|
def layout(self):
|
||||||
|
Reference in New Issue
Block a user