CastXML / pygccxml

pygccxml is a specialized XML reader that reads the output from CastXML. It provides a simple framework to navigate C++ declarations, using Python classes.
Boost Software License 1.0
132 stars 46 forks source link

ccflags seems not ok #173

Open guilvge opened 1 year ago

guilvge commented 1 year ago

hi: when I use pygccxml, I used the code may cause some warning but error, and I know use which flag to fixed it. for example: the code will show me [-Wnull-conversion], I can use flag " -Wno-null-conversion" to revert it, so I pass it in ccflags=-Wno-null-conversion, but it is not ok, the last cmd will like: "/usr/bin/castxml" -I"." -c -x c++ --castxml-cc-gnu "(" /usr/bin/clang++ -Wno-null-conversion ")" --castxml-gccxml -o /tmp/tmpxpsi9e2o.xml xxx, but it should be: ""/usr/bin/castxml" -I"." -c -x c++ -Wno-null-conversion --castxml-cc-gnu "(" /usr/bin/clang++ ")" --castxml-gccxml -o /tmp/tmpxpsi9e2o.xml xxx", the warning log will disapper by using this command. so I'm confused why the property "ccflags" not work.

guilvge commented 11 months ago

hi: I find the --castxml-cc- "(" ... ")" is only used in preprocessor, so compile stage may not use it, and there is still a parameter named "flags", it is not used. Maybe we can use it as clang-option.

guilvge commented 11 months ago

图片 I think we can add clang-opt here for potential usage