Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(74)

Unified Diff: tools/gn/target_generator.cc

Issue 216903004: Add optional public header checking to GN build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unit test Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/target_generator.h ('k') | tools/gn/trace.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/target_generator.cc
diff --git a/tools/gn/target_generator.cc b/tools/gn/target_generator.cc
index 5a7078cfb13cad3414b266eb6b04ff26d5aadc4c..570e1f89441b9f5f0939a32a750c9735f1e56079 100644
--- a/tools/gn/target_generator.cc
+++ b/tools/gn/target_generator.cc
@@ -137,6 +137,21 @@ void TargetGenerator::FillSources() {
target_->sources().swap(dest_sources);
}
+void TargetGenerator::FillPublic() {
+ const Value* value = scope_->GetValue(variables::kPublic, true);
+ if (!value)
+ return;
+
+ // If the public headers are defined, don't default to public.
+ target_->set_all_headers_public(false);
+
+ Target::FileList dest_public;
+ if (!ExtractListOfRelativeFiles(scope_->settings()->build_settings(), *value,
+ scope_->GetSourceDir(), &dest_public, err_))
+ return;
+ target_->public_headers().swap(dest_public);
+}
+
void TargetGenerator::FillSourcePrereqs() {
const Value* value = scope_->GetValue(variables::kSourcePrereqs, true);
if (!value)
« no previous file with comments | « tools/gn/target_generator.h ('k') | tools/gn/trace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698