OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "tools/gn/binary_target_generator.h" | 5 #include "tools/gn/binary_target_generator.h" |
6 | 6 |
7 #include "tools/gn/config_values_generator.h" | 7 #include "tools/gn/config_values_generator.h" |
8 #include "tools/gn/deps_iterator.h" | 8 #include "tools/gn/deps_iterator.h" |
9 #include "tools/gn/err.h" | 9 #include "tools/gn/err.h" |
10 #include "tools/gn/functions.h" | 10 #include "tools/gn/functions.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 return; | 56 return; |
57 | 57 |
58 // Config values (compiler flags, etc.) set directly on this target. | 58 // Config values (compiler flags, etc.) set directly on this target. |
59 ConfigValuesGenerator gen(&target_->config_values(), scope_, | 59 ConfigValuesGenerator gen(&target_->config_values(), scope_, |
60 scope_->GetSourceDir(), err_); | 60 scope_->GetSourceDir(), err_); |
61 gen.Run(); | 61 gen.Run(); |
62 if (err_->has_error()) | 62 if (err_->has_error()) |
63 return; | 63 return; |
64 } | 64 } |
65 | 65 |
66 bool BinaryTargetGenerator::FillCheckIncludes() { | |
67 const Value* value = scope_->GetValue(variables::kCheckIncludes, true); | |
68 if (!value) | |
69 return true; | |
70 if (!value->VerifyTypeIs(Value::BOOLEAN, err_)) | |
71 return false; | |
72 target_->set_check_includes(value->boolean_value()); | |
73 return true; | |
74 } | |
75 | |
76 bool BinaryTargetGenerator::FillCompleteStaticLib() { | 66 bool BinaryTargetGenerator::FillCompleteStaticLib() { |
77 if (target_->output_type() == Target::STATIC_LIBRARY) { | 67 if (target_->output_type() == Target::STATIC_LIBRARY) { |
78 const Value* value = scope_->GetValue(variables::kCompleteStaticLib, true); | 68 const Value* value = scope_->GetValue(variables::kCompleteStaticLib, true); |
79 if (!value) | 69 if (!value) |
80 return true; | 70 return true; |
81 if (!value->VerifyTypeIs(Value::BOOLEAN, err_)) | 71 if (!value->VerifyTypeIs(Value::BOOLEAN, err_)) |
82 return false; | 72 return false; |
83 target_->set_complete_static_lib(value->boolean_value()); | 73 target_->set_complete_static_lib(value->boolean_value()); |
84 } | 74 } |
85 return true; | 75 return true; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 "deps."); | 124 "deps."); |
135 return false; | 125 return false; |
136 } | 126 } |
137 } | 127 } |
138 | 128 |
139 // Add to the set. | 129 // Add to the set. |
140 for (const auto& cur : circular) | 130 for (const auto& cur : circular) |
141 target_->allow_circular_includes_from().insert(cur); | 131 target_->allow_circular_includes_from().insert(cur); |
142 return true; | 132 return true; |
143 } | 133 } |
OLD | NEW |