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

Method ProcessCacheArg

Source/cmake.cxx:785–809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

783}
784
785void 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
811void cmake::ReadListFile(std::vector<std::string> const& args,
812 std::string const& path)

Callers 2

SetCacheArgsMethod · 0.80

Calls 3

AddCacheEntryMethod · 0.95
WatchUnusedCliMethod · 0.95

Tested by

no test coverage detected