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

Method AppendModuleDefinitionFlag

Source/cmLocalGenerator.cxx:3721–3749  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3719}
3720
3721void cmLocalGenerator::AppendModuleDefinitionFlag(
3722 std::string& flags, cmGeneratorTarget const* target,
3723 cmLinkLineComputer* linkLineComputer, std::string const& config,
3724 std::string const& lang)
3725{
3726 cmGeneratorTarget::ModuleDefinitionInfo const* mdi =
3727 target->GetModuleDefinitionInfo(config);
3728 if (!mdi || mdi->DefFile.empty()) {
3729 return;
3730 }
3731
3732 cmValue defFileFlag = this->Makefile->GetDefinition(
3733 cmStrCat("CMAKE_", lang, "_LINK_DEF_FILE_FLAG"));
3734 if (!defFileFlag) {
3735 defFileFlag = this->Makefile->GetDefinition("CMAKE_LINK_DEF_FILE_FLAG");
3736 }
3737 if (!defFileFlag) {
3738 return;
3739 }
3740
3741 // Append the flag and value. Use ConvertToLinkReference to help
3742 // vs6's "cl -link" pass it to the linker.
3743 std::string flag =
3744 cmStrCat(*defFileFlag,
3745 this->ConvertToOutputFormat(
3746 linkLineComputer->ConvertToLinkReference(mdi->DefFile),
3747 cmOutputConverter::SHELL));
3748 this->AppendFlags(flags, flag);
3749}
3750
3751bool cmLocalGenerator::AppendLWYUFlags(std::string& flags,
3752 cmGeneratorTarget const* target,

Callers 4

GetTargetFlagsMethod · 0.95
WriteExecutableRuleMethod · 0.80

Calls 7

AppendFlagsMethod · 0.95
cmStrCatFunction · 0.70
emptyMethod · 0.45
GetDefinitionMethod · 0.45
ConvertToOutputFormatMethod · 0.45

Tested by

no test coverage detected