From 2f0a3bcae7e666d9d10de509306b6d22efc132dc Mon Sep 17 00:00:00 2001 From: Paul Kunysch Date: Fri, 31 Jan 2020 10:55:50 +0100 Subject: [PATCH] improve conan compiler version check (#24) --- conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conanfile.py b/conanfile.py index c132180..53c628e 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 MagicEnumConan(ConanFile): @@ -29,7 +29,7 @@ class MagicEnumConan(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 >= "9":