| 1724 | } |
| 1725 | |
| 1726 | void 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 | |
| 1755 | void cmVisualStudio10TargetGenerator::WriteCustomCommand( |
| 1756 | Elem& e0, cmSourceFile const* sf) |
no test coverage detected