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

Method WriteCustomCommands

Source/cmVisualStudio10TargetGenerator.cxx:1726–1753  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1724}
1725
1726void cmVisualStudio10TargetGenerator::WriteCustomCommands(Elem& e0)
1727{
1728 this->CSharpCustomCommandNames.clear();
1729
1730 cmSourceFile const* srcCMakeLists =
1731 this->LocalGenerator->CreateVCProjBuildRule();
1732
1733 for (cmGeneratorTarget::AllConfigSource const& si :
1734 this->GeneratorTarget->GetAllConfigSources()) {
1735 if (si.Source == srcCMakeLists) {
1736 // Skip explicit reference to CMakeLists.txt source.
1737 continue;
1738 }
1739 this->WriteCustomCommand(e0, si.Source);
1740 }
1741
1742 // Add CMakeLists.txt file with rule to re-run CMake for user convenience.
1743 if (this->GeneratorTarget->GetType() != cmStateEnums::GLOBAL_TARGET &&
1744 this->GeneratorTarget->GetName() != CMAKE_CHECK_BUILD_SYSTEM_TARGET) {
1745 if (srcCMakeLists) {
1746 // Write directly rather than through WriteCustomCommand because
1747 // we do not want the de-duplication and it has no dependencies.
1748 if (cmCustomCommand const* command = srcCMakeLists->GetCustomCommand()) {
1749 this->WriteCustomRule(e0, srcCMakeLists, *command);
1750 }
1751 }
1752 }
1753}
1754
1755void cmVisualStudio10TargetGenerator::WriteCustomCommand(
1756 Elem& e0, cmSourceFile const* sf)

Callers 2

Calls 8

WriteCustomCommandMethod · 0.95
WriteCustomRuleMethod · 0.95
CreateVCProjBuildRuleMethod · 0.80
GetAllConfigSourcesMethod · 0.80
GetCustomCommandMethod · 0.80
clearMethod · 0.45
GetTypeMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected