File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change 1
1
from conan .tools .gnu .autotools import Autotools
2
2
from conan .tools .gnu .autotoolstoolchain import AutotoolsToolchain
3
3
from conan .tools .gnu .autotoolsdeps import AutotoolsDeps
4
+ from conan .tools .gnu .mingw import is_mingw
4
5
from conan .tools .gnu .pkgconfig import PkgConfig
5
6
from conan .tools .gnu .pkgconfigdeps import PkgConfigDeps
Original file line number Diff line number Diff line change
1
+ def is_mingw (conanfile ):
2
+ """
3
+ Validate if current compiler in host setttings is related to MinGW
4
+
5
+ :return: True, if the host compiler is related to MinGW, otherwise False.
6
+ """
7
+ host_os = conanfile .settings .get_safe ("os" )
8
+ host_compiler = conanfile .settings .get_safe ("compiler" )
9
+ mingw_gcc = host_os == "Windows" and host_compiler == "gcc"
10
+ mingw_clang = host_os == "Windows" and host_compiler == "clang" and \
11
+ not conanfile .settings .get_safe ("compiler.runtime" )
12
+ return mingw_gcc or mingw_clang
You can’t perform that action at this time.
0 commit comments