[PATCH] CMake: Automatically pick up subdirectories in llvm/tools as 'external projects' if they contain a 'CMakeLists.txt' file

Michael Gottesman mgottesman at apple.com
Tue Aug 20 23:24:32 PDT 2013


Looks much better. One last nit then LGTM. I understand why you would make {add,ignore}_llvm_tool_subdirectory macros since they are so small, but do you have any reason why you made add_llvm_implicit_external_projects a macro. It seems to me to be more of a function since it:

1. Takes no arguments.
2. Sets variables which are used only locally suggesting that you want to have the local scope of a function instead of the global scope of a macro.

Michael

On Aug 20, 2013, at 6:00 PM, Argyrios Kyrtzidis <kyrtzidis at apple.com> wrote:

> On Aug 20, 2013, at 5:27 PM, Michael Gottesman <mgottesman at apple.com> wrote:
> 
>> Hey Argyrios.
>> 
>> I like the patch, but I think that the name of the variable LLVM_TOOL_SUBDIRS is misleading since you are appending to it subdirectories that are going to explicitly not be included as well as those that will be. I can easily see a tired befuddled programmer getting confused about the meaning of said variable since it violates the expectations that every directory in that variable will include a tool that will be built (I was confused and I am only slightly tired/befuddled).
>> 
>> The real thing you are using said variable for is to act as a signal to add_llvm_implicit_external_projects that it should ignore said subdirectory. Perhaps something like LLVM_IMPLICIT_PROJECT_IGNORE? Even though that name sucks, it at least makes it absolutely clear about the purpose of the variable.
> 
> Yes, that is better, thanks!
> 
> Attached new patch.
> 
> <auto-external-proj2.diff>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130820/622a8fc1/attachment.html>


More information about the llvm-commits mailing list