MCPcopy Create free account
hub / github.com/Kitware/CMake / SetCompilerFlags

Method SetCompilerFlags

Source/cmGhsMultiTargetGenerator.cxx:194–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194void cmGhsMultiTargetGenerator::SetCompilerFlags(std::string const& config,
195 std::string const& language)
196{
197 auto i = this->FlagsByLanguage.find(language);
198 if (i == this->FlagsByLanguage.end()) {
199 std::string flags;
200 this->LocalGenerator->AddLanguageFlags(
201 flags, this->GeneratorTarget, cmBuildStep::Compile, language, config);
202 this->LocalGenerator->AddFeatureFlags(flags, this->GeneratorTarget,
203 language, config);
204 this->LocalGenerator->AddVisibilityPresetFlags(
205 flags, this->GeneratorTarget, language);
206 this->LocalGenerator->AddColorDiagnosticsFlags(flags, language);
207
208 // Append old-style preprocessor definition flags.
209 if (this->Makefile->GetDefineFlags() != " ") {
210 this->LocalGenerator->AppendFlags(flags,
211 this->Makefile->GetDefineFlags());
212 }
213
214 // Add target-specific flags.
215 this->LocalGenerator->AddCompileOptions(flags, this->GeneratorTarget,
216 language, config);
217
218 std::map<std::string, std::string>::value_type entry(language, flags);
219 i = this->FlagsByLanguage.insert(entry).first;
220 }
221}
222
223std::string cmGhsMultiTargetGenerator::GetDefines(std::string const& language,
224 std::string const& config)

Callers 1

GenerateTargetMethod · 0.95

Calls 10

AddLanguageFlagsMethod · 0.80
AddFeatureFlagsMethod · 0.80
GetDefineFlagsMethod · 0.80
AddCompileOptionsMethod · 0.80
findMethod · 0.45
endMethod · 0.45
AppendFlagsMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected