From 1303731a6bd36d9c93f2da8dfde28995da1027d9 Mon Sep 17 00:00:00 2001 From: Neargye Date: Fri, 31 Jan 2020 14:04:09 +0500 Subject: [PATCH] improve conan compiler version check --- conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index 65422c6..3a122d3 100644 --- a/conanfile.py +++ b/conanfile.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -from conans import ConanFile +from conans import ConanFile, tools from conans.errors import ConanInvalidConfiguration class NameofConan(ConanFile): @@ -29,7 +29,7 @@ class NameofConan(ConanFile): @property def supported_compiler(self): compiler = str(self.settings.compiler) - version = str(self.settings.compiler.version) + version = tools.Version(self.settings.compiler.version) if compiler == "Visual Studio" and version >= "15": return True if compiler == "gcc" and version >= "7":