| 524 | } |
| 525 | |
| 526 | void cmCacheManager::AddCacheEntry(std::string const& key, cmValue value, |
| 527 | cmValue helpString, |
| 528 | cmStateEnums::CacheEntryType type) |
| 529 | { |
| 530 | CacheEntry& e = this->Cache[key]; |
| 531 | e.SetValue(value); |
| 532 | e.Type = type; |
| 533 | // make sure we only use unix style paths |
| 534 | if (type == cmStateEnums::FILEPATH || type == cmStateEnums::PATH) { |
| 535 | if (e.Value.find(';') != std::string::npos) { |
| 536 | cmList paths{ e.Value }; |
| 537 | for (std::string& i : paths) { |
| 538 | cmSystemTools::ConvertToUnixSlashes(i); |
| 539 | } |
| 540 | e.Value = paths.to_string(); |
| 541 | } else { |
| 542 | cmSystemTools::ConvertToUnixSlashes(e.Value); |
| 543 | } |
| 544 | } |
| 545 | e.SetProperty( |
| 546 | "HELPSTRING", |
| 547 | helpString ? *helpString |
| 548 | : std::string{ |
| 549 | "(This variable does not exist and should not be used)" }); |
| 550 | } |
| 551 | |
| 552 | void cmCacheManager::CacheEntry::SetValue(cmValue value) |
| 553 | { |