| 783 | } |
| 784 | |
| 785 | void cmake::ProcessCacheArg(std::string const& var, std::string const& value, |
| 786 | cmStateEnums::CacheEntryType type) |
| 787 | { |
| 788 | // The value is transformed if it is a filepath for example, so |
| 789 | // we can't compare whether the value is already in the cache until |
| 790 | // after we call AddCacheEntry. |
| 791 | bool haveValue = false; |
| 792 | std::string cachedValue; |
| 793 | if (this->WarnUnusedCli) { |
| 794 | if (cmValue v = this->State->GetInitializedCacheValue(var)) { |
| 795 | haveValue = true; |
| 796 | cachedValue = *v; |
| 797 | } |
| 798 | } |
| 799 | |
| 800 | this->AddCacheEntry( |
| 801 | var, value, "No help, variable specified on the command line.", type); |
| 802 | |
| 803 | if (this->WarnUnusedCli) { |
| 804 | if (!haveValue || |
| 805 | cachedValue != *this->State->GetInitializedCacheValue(var)) { |
| 806 | this->WatchUnusedCli(var); |
| 807 | } |
| 808 | } |
| 809 | } |
| 810 | |
| 811 | void cmake::ReadListFile(std::vector<std::string> const& args, |
| 812 | std::string const& path) |
no test coverage detected