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

Method GetCreateRuleVariable

Source/cmGeneratorTarget.cxx:2834–2862  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

2832
2833//----------------------------------------------------------------------------
2834std::string cmGeneratorTarget::GetCreateRuleVariable(
2835 std::string const& lang, std::string const& config) const
2836{
2837 switch (this->GetType()) {
2838 case cmStateEnums::STATIC_LIBRARY: {
2839 std::string var = cmStrCat("CMAKE_", lang, "_CREATE_STATIC_LIBRARY");
2840 return this->GetFeatureSpecificLinkRuleVariable(var, lang, config);
2841 }
2842 case cmStateEnums::SHARED_LIBRARY:
2843 if (this->IsArchivedAIXSharedLibrary()) {
2844 return cmStrCat("CMAKE_", lang, "_CREATE_SHARED_LIBRARY_ARCHIVE");
2845 }
2846 return cmStrCat("CMAKE_", lang, "_CREATE_SHARED_LIBRARY");
2847 case cmStateEnums::MODULE_LIBRARY:
2848 return cmStrCat("CMAKE_", lang, "_CREATE_SHARED_MODULE");
2849 case cmStateEnums::EXECUTABLE:
2850 if (this->IsExecutableWithExports()) {
2851 std::string linkExeWithExports =
2852 cmStrCat("CMAKE_", lang, "_LINK_EXECUTABLE_WITH_EXPORTS");
2853 if (this->Makefile->IsDefinitionSet(linkExeWithExports)) {
2854 return linkExeWithExports;
2855 }
2856 }
2857 return cmStrCat("CMAKE_", lang, "_LINK_EXECUTABLE");
2858 default:
2859 break;
2860 }
2861 return {};
2862}
2863
2864//----------------------------------------------------------------------------
2865std::string cmGeneratorTarget::GetClangTidyExportFixesDirectory(

Callers 6

WriteExecutableRuleMethod · 0.80
GetLinkCommandMethod · 0.80
ComputeLinkCmdMethod · 0.80
WriteLinkStatementMethod · 0.80

Calls 6

GetTypeMethod · 0.95
IsDefinitionSetMethod · 0.80
cmStrCatFunction · 0.70

Tested by

no test coverage detected