Closed zadr closed 11 years ago
Probably a dumb question, but is there any advantage in having a static library?
Static library targets allows for ODRefreshControl to have its own set of build flags without interfering with external projects that use it (easier to mix ARC and non-ARC, for example).
Well, it can already have it's own flags set in the build phase tab no?
(PS: not arguing, just want to know if it's useful :) the others 2 commit are definitely ok :+1: )
While you can add flags to individual files in the project menu, it is rather annoying/difficult to do so (you have to know the GCC/Clang flag to add, make sure the order is right, etc) and requires effort from the consumer of the library.
I think its much better to have a nice dropdown menu or checkbox, and set flags once and be able to know for sure that it will build the same for everyone, everywhere.
Also, this allows for the opposite behavior: for people to have a specific set of compiler flags that apply to their project, but not third party code. (Example: Clang has an option to warn on direct ivar access. Some projects may have a style that mandates to never access ivars directly. In that case, it would make sense to turn this warning on. But, doing so would lead to dozens of warnings from ODRefreshControl if it is included in the project directly. A static library to link against avoids this problem.)
A static library target would also allow ODRefreshControl to have project-wide settings for spaces instead of tabs, to avoid contributors having to either make commits like 0ed3f8a, or having to rebase stuff in specifically to fix up whitespace ;)