Skip to content

Commit 6dea344

Browse files
committed
Fix logic for compiler detection
1 parent 96cbfc5 commit 6dea344

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pygccxml/parser/source_reader.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,9 @@ def __create_command_line_castxml(self, source_file, xmlfile):
123123

124124
# Platform specific options
125125
if platform.system() == 'Windows':
126-
compilers = ("mingw" or "g++" or "gcc")
127-
if compilers in self.__config.compiler_path.lower():
126+
compilers = ("mingw", "g++", "gcc")
127+
compiler_path = self.__config.compiler_path.lower()
128+
if any(compiler in compiler_path for compiler in compilers):
128129
# Look at the compiler path. This is a bad way
129130
# to find out if we are using mingw; but it
130131
# should probably work in most of the cases

0 commit comments

Comments
 (0)