Issues using Doxygen in Xcode -- warnings treated as errors
Issues using Doxygen in Xcode -- warnings treated as errors
- Subject: Issues using Doxygen in Xcode -- warnings treated as errors
- From: Jens Alfke <email@hidden>
- Date: Tue, 23 Jul 2013 12:05:56 -0700
I’m setting up an Xcode target to run Doxygen on my source files and generate API documentation, and running into a couple of glitches.
One isn’t Xcode-specific, but it triggers the other issue. If I use an “__attribute__” annotation at the end of a method declaration in the @interface, Doxygen’s parser gets confused by it and won’t recognize the parameter name that immediately precedes it. This causes it to emit a warning if I have an @param tag referencing that parameter. For example, with the following declaration:
/** Creates or updates an attachment (in memory). The attachment data will be written to the database at the same time as property changes are saved. @param attachment A newly-created CBLAttachment (not yet associated with any revision) @param name The attachment name. */ - (void) addAttachment: (CBLAttachment*)attachment named: (NSString*)name __attribute__((nonnull(2)));
Doxygen outputs this warning:
/Couchbase/CouchbaseLite/Source/API/CBLModel.h:111: Warning: argument 'name' of command @param is not found in the argument list of CBLModel::addAttachment:named:(CBLAttachment *attachment)
I’ve tried wrapping the __attribute__ in a macro so it looks like “NONNULL(2)”, but Doxygen still doesn’t like that. Anyone know how to work around this?
The second issue stems from the first. Xcode always displays the above warning as an error, i.e. red text with a stop-sign icon. Fortunately it doesn’t cause the build to fail, but it does emit a plaintive warning Command Documentation/build_docs.sh emitted errors but did not return a nonzero exit code to indicate failure I’d rather not have my build output littered with things that look like errors, but I’m not sure how to tell Xcode that it shouldn’t be treating the emitted warnings as errors. I’ve tried setting the build configuration variable “GCC_TREAT_WARNINGS_AS_ERRORS” to NO but it doesn’t help, and I can’t find any other documented variables that seem relevant.
—Jens |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden