From 6dea3448d746ee243b3525a12ca86b42635a2741 Mon Sep 17 00:00:00 2001 From: Michka Popoff Date: Mon, 13 Jan 2020 19:32:19 +0100 Subject: [PATCH] Fix logic for compiler detection --- pygccxml/parser/source_reader.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pygccxml/parser/source_reader.py b/pygccxml/parser/source_reader.py index 8aaaf6f4..9bf35f8c 100644 --- a/pygccxml/parser/source_reader.py +++ b/pygccxml/parser/source_reader.py @@ -123,8 +123,9 @@ def __create_command_line_castxml(self, source_file, xmlfile): # Platform specific options if platform.system() == 'Windows': - compilers = ("mingw" or "g++" or "gcc") - if compilers in self.__config.compiler_path.lower(): + compilers = ("mingw", "g++", "gcc") + compiler_path = self.__config.compiler_path.lower() + if any(compiler in compiler_path for compiler in compilers): # Look at the compiler path. This is a bad way # to find out if we are using mingw; but it # should probably work in most of the cases