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

Method WriteRuleFiles

Source/cmMakefileLibraryTargetGenerator.cxx:52–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 default;
51
52void cmMakefileLibraryTargetGenerator::WriteRuleFiles()
53{
54 // create the build.make file and directory, put in the common blocks
55 this->CreateRuleFile();
56
57 // write rules used to help build object files
58 this->WriteCommonCodeRules();
59
60 // write the per-target per-language flags
61 this->WriteTargetLanguageFlags();
62
63 // write in rules for object files and custom commands
64 this->WriteTargetBuildRules();
65
66 // Write in the rules for the link dependency file
67 this->WriteTargetLinkDependRules();
68
69 // write the link rules
70 // Write the rule for this target type.
71 switch (this->GeneratorTarget->GetType()) {
72 case cmStateEnums::STATIC_LIBRARY:
73 this->WriteStaticLibraryRules();
74 break;
75 case cmStateEnums::SHARED_LIBRARY:
76 this->WriteSharedLibraryRules(false);
77 if (this->GeneratorTarget->NeedRelinkBeforeInstall(
78 this->GetConfigName())) {
79 // Write rules to link an installable version of the target.
80 this->WriteSharedLibraryRules(true);
81 }
82 break;
83 case cmStateEnums::MODULE_LIBRARY:
84 this->WriteModuleLibraryRules(false);
85 if (this->GeneratorTarget->NeedRelinkBeforeInstall(
86 this->GetConfigName())) {
87 // Write rules to link an installable version of the target.
88 this->WriteModuleLibraryRules(true);
89 }
90 break;
91 case cmStateEnums::OBJECT_LIBRARY:
92 this->WriteObjectLibraryRules();
93 break;
94 default:
95 // If language is not known, this is an error.
96 cmSystemTools::Error("Unknown Library Type");
97 break;
98 }
99
100 // Write clean target
101 this->WriteTargetCleanRules();
102
103 // Write the dependency generation rule. This must be done last so
104 // that multiple output pair information is available.
105 this->WriteTargetDependRules();
106
107 // close the streams
108 this->CloseFileStreams();
109}

Callers

nothing calls this directly

Calls 15

CreateRuleFileMethod · 0.80
WriteCommonCodeRulesMethod · 0.80
WriteTargetBuildRulesMethod · 0.80
WriteTargetCleanRulesMethod · 0.80

Tested by

no test coverage detected