Tries to get xcode_settings.setting from spec. Assumes that the setting has the same value in all configurations and throws otherwise.
(self, setting, default=None)
| 1037 | return self.GetPerTargetSetting(setting, default) |
| 1038 | |
| 1039 | def GetPerTargetSetting(self, setting, default=None): |
| 1040 | """Tries to get xcode_settings.setting from spec. Assumes that the setting |
| 1041 | has the same value in all configurations and throws otherwise.""" |
| 1042 | is_first_pass = True |
| 1043 | result = None |
| 1044 | for configname in sorted(self.xcode_settings.keys()): |
| 1045 | if is_first_pass: |
| 1046 | result = self.xcode_settings[configname].get(setting, None) |
| 1047 | is_first_pass = False |
| 1048 | else: |
| 1049 | assert result == self.xcode_settings[configname].get(setting, None), ( |
| 1050 | "Expected per-target setting for '%s', got per-config setting " |
| 1051 | "(target %s)" % (setting, self.spec["target_name"]) |
| 1052 | ) |
| 1053 | if result is None: |
| 1054 | return default |
| 1055 | return result |
| 1056 | |
| 1057 | def _GetStripPostbuilds(self, configname, output_binary, quiet): |
| 1058 | """Returns a list of shell commands that contain the shell commands |
no test coverage detected