-
Notifications
You must be signed in to change notification settings - Fork 980
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
from conan.tools.gnu.autotools import Autotools | ||
from conan.tools.gnu.autotoolstoolchain import AutotoolsToolchain | ||
from conan.tools.gnu.autotoolsdeps import AutotoolsDeps | ||
from conan.tools.gnu.mingw import is_mingw | ||
from conan.tools.gnu.pkgconfig import PkgConfig | ||
from conan.tools.gnu.pkgconfigdeps import PkgConfigDeps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
def is_mingw(conanfile): | ||
""" | ||
Validate if current compiler in host setttings is related to MinGW | ||
:return: True, if the host compiler is related to MinGW, otherwise False. | ||
""" | ||
host_os = conanfile.settings.get_safe("os") | ||
host_compiler = conanfile.settings.get_safe("compiler") | ||
is_mingw_gcc = host_os == "Windows" and host_compiler == "gcc" | ||
is_mingw_clang = host_os == "Windows" and host_compiler == "clang" and \ | ||
not conanfile.settings.get_safe("compiler.runtime") | ||
return is_mingw_gcc or is_mingw_clang |