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

Method ComputeDefines

Source/cmFastbuildNormalTargetGenerator.cxx:393–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

391}
392
393std::string cmFastbuildNormalTargetGenerator::ComputeDefines(
394 cmSourceFile const& srcFile)
395{
396 std::string const language = srcFile.GetLanguage();
397 std::set<std::string> defines;
398 cmGeneratorExpressionInterpreter genexInterpreter(
399 this->GetLocalGenerator(), Config, this->GeneratorTarget, language);
400
401 if (auto compile_defs = srcFile.GetProperty(COMPILE_DEFINITIONS)) {
402 this->GetLocalGenerator()->AppendDefines(
403 defines, genexInterpreter.Evaluate(*compile_defs, COMPILE_DEFINITIONS));
404 }
405
406 std::string defPropName = "COMPILE_DEFINITIONS_";
407 defPropName += cmSystemTools::UpperCase(Config);
408 if (auto config_compile_defs = srcFile.GetProperty(defPropName)) {
409 this->GetLocalGenerator()->AppendDefines(
410 defines,
411 genexInterpreter.Evaluate(*config_compile_defs, COMPILE_DEFINITIONS));
412 }
413
414 std::string definesString = this->GetDefines(language, Config);
415 LogMessage(cmStrCat("TARGET DEFINES = ", definesString));
416 this->GetLocalGenerator()->JoinDefines(defines, definesString, language);
417
418 LogMessage(cmStrCat("DEFINES = ", definesString));
419 return definesString;
420}
421
422void cmFastbuildNormalTargetGenerator::ComputePCH(
423 cmSourceFile const& srcFile, FastbuildObjectListNode& node,

Callers

nothing calls this directly

Calls 8

GetLanguageMethod · 0.80
JoinDefinesMethod · 0.80
cmStrCatFunction · 0.70
GetLocalGeneratorMethod · 0.45
GetPropertyMethod · 0.45
AppendDefinesMethod · 0.45
EvaluateMethod · 0.45
GetDefinesMethod · 0.45

Tested by

no test coverage detected