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

Method AddColorDiagnosticsFlags

Source/cmLocalGenerator.cxx:2507–2527  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2505}
2506
2507void cmLocalGenerator::AddColorDiagnosticsFlags(std::string& flags,
2508 std::string const& lang)
2509{
2510 cmValue diag = this->Makefile->GetDefinition("CMAKE_COLOR_DIAGNOSTICS");
2511 if (diag.IsSet()) {
2512 std::string colorFlagName;
2513 if (diag.IsOn()) {
2514 colorFlagName =
2515 cmStrCat("CMAKE_", lang, "_COMPILE_OPTIONS_COLOR_DIAGNOSTICS");
2516 } else {
2517 colorFlagName =
2518 cmStrCat("CMAKE_", lang, "_COMPILE_OPTIONS_COLOR_DIAGNOSTICS_OFF");
2519 }
2520
2521 cmList options{ this->Makefile->GetDefinition(colorFlagName) };
2522
2523 for (auto const& option : options) {
2524 this->AppendFlagEscape(flags, option);
2525 }
2526 }
2527}
2528
2529void cmLocalGenerator::AddConfigVariableFlags(std::string& flags,
2530 std::string const& var,

Callers 2

GetTargetCompileFlagsMethod · 0.95
SetCompilerFlagsMethod · 0.80

Calls 5

AppendFlagEscapeMethod · 0.95
cmStrCatFunction · 0.70
GetDefinitionMethod · 0.45
IsSetMethod · 0.45
IsOnMethod · 0.45

Tested by

no test coverage detected