| 1647 | } |
| 1648 | |
| 1649 | void cmLocalUnixMakefileGenerator3::CheckMultipleOutputs(bool verbose) |
| 1650 | { |
| 1651 | cmMakefile* mf = this->Makefile; |
| 1652 | |
| 1653 | // Get the string listing the multiple output pairs. |
| 1654 | cmValue pairs_string = mf->GetDefinition("CMAKE_MULTIPLE_OUTPUT_PAIRS"); |
| 1655 | if (!pairs_string) { |
| 1656 | return; |
| 1657 | } |
| 1658 | |
| 1659 | // Convert the string to a list and preserve empty entries. |
| 1660 | cmList pairs{ *pairs_string, cmList::EmptyElements::Yes }; |
| 1661 | for (auto i = pairs.begin(); i != pairs.end() && (i + 1) != pairs.end();) { |
| 1662 | std::string const& depender = *i++; |
| 1663 | std::string const& dependee = *i++; |
| 1664 | |
| 1665 | // If the depender is missing then delete the dependee to make |
| 1666 | // sure both will be regenerated. |
| 1667 | if (cmSystemTools::FileExists(dependee) && |
| 1668 | !cmSystemTools::FileExists(depender)) { |
| 1669 | if (verbose) { |
| 1670 | cmSystemTools::Stdout(cmStrCat( |
| 1671 | "Deleting primary custom command output \"", dependee, |
| 1672 | "\" because another output \"", depender, "\" does not exist.\n")); |
| 1673 | } |
| 1674 | cmSystemTools::RemoveFile(dependee); |
| 1675 | } |
| 1676 | } |
| 1677 | } |
| 1678 | |
| 1679 | void cmLocalUnixMakefileGenerator3::WriteLocalAllRules( |
| 1680 | std::ostream& ruleFileStream) |
no test coverage detected