Skip to content

Commit fa8cfb5

Browse files
committed
fix: Add ccflags and c++ standard in msvc arguments
previously the ccflags and cflags will be ingored if running on Windows
1 parent f57ddbb commit fa8cfb5

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/pygccxml/parser/source_reader.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -140,21 +140,21 @@ def __create_command_line_castxml(self, source_file, xmlfile):
140140
# On mac or linux, use gcc or clang (the flag is the same)
141141
cmd.append('--castxml-cc-gnu ')
142142

143-
if self.__cxx_std.is_implicit:
144-
std_flag = ''
145-
else:
146-
std_flag = ' ' + self.__cxx_std.stdcxx + ' '
143+
if self.__cxx_std.is_implicit:
144+
std_flag = ''
145+
else:
146+
std_flag = ' ' + self.__cxx_std.stdcxx + ' '
147147

148-
ccflags = self.__config.ccflags
149-
if std_flag:
150-
ccflags += std_flag
148+
ccflags = self.__config.ccflags
149+
if std_flag:
150+
ccflags += std_flag
151151

152-
if ccflags:
153-
all_cc_opts = self.__config.compiler_path + ' ' + ccflags
154-
cmd.append(
155-
'"(" ' + all_cc_opts + ' ")"')
156-
else:
157-
cmd.append(self.__config.compiler_path)
152+
if ccflags:
153+
all_cc_opts = f'"{self.__config.compiler_path}"'+ ' ' + ccflags
154+
cmd.append(
155+
'"(" ' + all_cc_opts + ' ")"')
156+
else:
157+
cmd.append(f'"{self.__config.compiler_path}"')
158158

159159
if self.__config.castxml_epic_version is not None:
160160
if self.__config.castxml_epic_version != 1:

0 commit comments

Comments
 (0)