improve conan compiler version check
This commit is contained in:
parent
ef959f7da5
commit
1303731a6b
1 changed files with 2 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from conans import ConanFile
|
from conans import ConanFile, tools
|
||||||
from conans.errors import ConanInvalidConfiguration
|
from conans.errors import ConanInvalidConfiguration
|
||||||
|
|
||||||
class NameofConan(ConanFile):
|
class NameofConan(ConanFile):
|
||||||
|
@ -29,7 +29,7 @@ class NameofConan(ConanFile):
|
||||||
@property
|
@property
|
||||||
def supported_compiler(self):
|
def supported_compiler(self):
|
||||||
compiler = str(self.settings.compiler)
|
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":
|
if compiler == "Visual Studio" and version >= "15":
|
||||||
return True
|
return True
|
||||||
if compiler == "gcc" and version >= "7":
|
if compiler == "gcc" and version >= "7":
|
||||||
|
|
Loading…
Reference in a new issue