This is an archive of the discontinued LLVM Phabricator instance.

[cmake] Clean up add_llvm_subdirectory
ClosedPublic

Authored by smeenai on Nov 29 2018, 10:41 PM.

Details

Summary

I found the pattern of setting the project_BUILD variable to OFF after
processing the project to be pretty confusing. Using global properties
to explicitly keep track of whether a project has been processed or not
seems much more straightforward, and it also allows us to convert the
macro into a function (which is required for the early return).

Factor the project+type+name combination out into a variable while I'm
here, since it's used a whole bunch of times.

I don't believe this should result in any functional changes.

Diff Detail

Repository
rL LLVM

Event Timeline

smeenai created this revision.Nov 29 2018, 10:41 PM
phosek accepted this revision.Dec 3 2018, 12:04 PM

LGTM

This revision is now accepted and ready to land.Dec 3 2018, 12:04 PM
This revision was automatically updated to reflect the committed changes.