Skip to content

Commit 0f1d7ca

Browse files
mamolliMichka
authored andcommitted
pass C++11 flag to castxml
Cherry-picked from the develop branch
1 parent bc0bf35 commit 0f1d7ca

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pygccxml/parser/source_reader.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,10 @@ def __create_command_line_castxml(self, source_file, xmlfile):
161161
else:
162162

163163
# On mac or linux, use gcc or clang (the flag is the same)
164-
cmd.append('--castxml-cc-gnu ' + self.__config.compiler_path)
164+
if '-std=c++11' in self.__config.cflags:
165+
cmd.append('--castxml-cc-gnu ' + '"(" ' + self.__config.compiler_path + ' -std=c++11 ")"')
166+
else:
167+
cmd.append('--castxml-cc-gnu ' + self.__config.compiler_path)
165168

166169
# Tell castxml to output xml compatible files with gccxml
167170
# so that we can parse them with pygccxml

0 commit comments

Comments
 (0)