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 -*-
|
||||
|
||||
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":
|
||||
|
|
Loading…
Reference in a new issue