1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
13 #include "cmCacheManager.h"
14 #include "cmSystemTools.h"
15 #include "cmCacheManager.h"
16 #include "cmGeneratedFileStream.h"
17 #include "cmMakefile.h"
19 #include "cmVersion.h"
21 #include <cmsys/Directory.hxx>
22 #include <cmsys/Glob.hxx>
24 #include <cmsys/RegularExpression.hxx>
26 const char* cmCacheManagerTypes[] =
37 cmCacheManager::cmCacheManager(cmake* cm)
39 this->CacheMajorVersion = 0;
40 this->CacheMinorVersion = 0;
41 this->CMakeInstance = cm;
44 const char* cmCacheManager::TypeToString(cmCacheManager::CacheEntryType type)
48 return cmCacheManagerTypes[6];
50 return cmCacheManagerTypes[type];
53 cmCacheManager::CacheEntryType cmCacheManager::StringToType(const char* s)
56 while(cmCacheManagerTypes[i])
58 if(strcmp(s, cmCacheManagerTypes[i]) == 0)
60 return static_cast<CacheEntryType>(i);
67 bool cmCacheManager::IsType(const char* s)
69 for(int i=0; cmCacheManagerTypes[i]; ++i)
71 if(strcmp(s, cmCacheManagerTypes[i]) == 0)
79 bool cmCacheManager::LoadCache(cmMakefile* mf)
81 return this->LoadCache(mf->GetHomeOutputDirectory());
85 bool cmCacheManager::LoadCache(const char* path)
87 return this->LoadCache(path,true);
90 bool cmCacheManager::LoadCache(const char* path,
93 std::set<cmStdString> emptySet;
94 return this->LoadCache(path, internal, emptySet, emptySet);
97 static bool ParseEntryWithoutType(const char* entry,
101 // input line is: key=value
102 static cmsys::RegularExpression reg(
103 "^([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
104 // input line is: "key"=value
105 static cmsys::RegularExpression regQuoted(
106 "^\"([^\"]*)\"=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
108 if(regQuoted.find(entry))
110 var = regQuoted.match(1);
111 value = regQuoted.match(2);
114 else if (reg.find(entry))
117 value = reg.match(2);
121 // if value is enclosed in single quotes ('foo') then remove them
122 // it is used to enclose trailing space or tab
126 value[value.size() - 1] == '\'')
128 value = value.substr(1,
135 bool cmCacheManager::ParseEntry(const char* entry,
138 CacheEntryType& type)
140 // input line is: key:type=value
141 static cmsys::RegularExpression reg(
142 "^([^:]*):([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
143 // input line is: "key":type=value
144 static cmsys::RegularExpression regQuoted(
145 "^\"([^\"]*)\":([^=]*)=(.*[^\r\t ]|[\r\t ]*)[\r\t ]*$");
147 if(regQuoted.find(entry))
149 var = regQuoted.match(1);
150 type = cmCacheManager::StringToType(regQuoted.match(2).c_str());
151 value = regQuoted.match(3);
154 else if (reg.find(entry))
157 type = cmCacheManager::StringToType(reg.match(2).c_str());
158 value = reg.match(3);
162 // if value is enclosed in single quotes ('foo') then remove them
163 // it is used to enclose trailing space or tab
167 value[value.size() - 1] == '\'')
169 value = value.substr(1,
175 return ParseEntryWithoutType(entry, var, value);
181 void cmCacheManager::CleanCMakeFiles(const char* path)
183 std::string glob = path;
184 glob += cmake::GetCMakeFilesDirectory();
187 globIt.FindFiles(glob);
188 std::vector<std::string> files = globIt.GetFiles();
189 for(std::vector<std::string>::iterator i = files.begin();
190 i != files.end(); ++i)
192 cmSystemTools::RemoveFile(i->c_str());
196 bool cmCacheManager::LoadCache(const char* path,
198 std::set<cmStdString>& excludes,
199 std::set<cmStdString>& includes)
201 std::string cacheFile = path;
202 cacheFile += "/CMakeCache.txt";
203 // clear the old cache, if we are reading in internal values
208 if(!cmSystemTools::FileExists(cacheFile.c_str()))
210 this->CleanCMakeFiles(path);
214 std::ifstream fin(cacheFile.c_str());
219 const char *realbuffer;
221 std::string entryKey;
224 // Format is key:type=value
225 std::string helpString;
227 e.Properties.SetCMakeInstance(this->CMakeInstance);
228 cmSystemTools::GetLineFromStream(fin, buffer);
229 realbuffer = buffer.c_str();
230 while(*realbuffer != '0' &&
231 (*realbuffer == ' ' ||
232 *realbuffer == '\t' ||
233 *realbuffer == '\r' ||
234 *realbuffer == '\n'))
238 // skip blank lines and comment lines
239 if(realbuffer[0] == '#' || realbuffer[0] == 0)
243 while(realbuffer[0] == '/' && realbuffer[1] == '/')
245 if ((realbuffer[2] == '\\') && (realbuffer[3]=='n'))
248 helpString += &realbuffer[4];
252 helpString += &realbuffer[2];
254 cmSystemTools::GetLineFromStream(fin, buffer);
255 realbuffer = buffer.c_str();
261 e.SetProperty("HELPSTRING", helpString.c_str());
262 if(cmCacheManager::ParseEntry(realbuffer, entryKey, e.Value, e.Type))
264 if ( excludes.find(entryKey) == excludes.end() )
266 // Load internal values if internal is set.
267 // If the entry is not internal to the cache being loaded
268 // or if it is in the list of internal entries to be
269 // imported, load it.
270 if ( internal || (e.Type != INTERNAL) ||
271 (includes.find(entryKey) != includes.end()) )
273 // If we are loading the cache from another project,
274 // make all loaded entries internal so that it is
275 // not visible in the gui
279 helpString = "DO NOT EDIT, ";
280 helpString += entryKey;
281 helpString += " loaded from external file. "
282 "To change this value edit this file: ";
284 helpString += "/CMakeCache.txt" ;
285 e.SetProperty("HELPSTRING", helpString.c_str());
287 if(!this->ReadPropertyEntry(entryKey, e))
289 e.Initialized = true;
290 this->Cache[entryKey] = e;
297 cmSystemTools::Error("Parse error in cache file ", cacheFile.c_str(),
298 ". Offending entry: ", realbuffer);
301 this->CacheMajorVersion = 0;
302 this->CacheMinorVersion = 0;
303 if(const char* cmajor = this->GetCacheValue("CMAKE_CACHE_MAJOR_VERSION"))
306 if(sscanf(cmajor, "%u", &v) == 1)
308 this->CacheMajorVersion = v;
310 if(const char* cminor = this->GetCacheValue("CMAKE_CACHE_MINOR_VERSION"))
312 if(sscanf(cminor, "%u", &v) == 1)
314 this->CacheMinorVersion = v;
320 // CMake version not found in the list file.
321 // Set as version 0.0
322 this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", "0",
323 "Minor version of cmake used to create the "
324 "current loaded cache", cmCacheManager::INTERNAL);
325 this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", "0",
326 "Major version of cmake used to create the "
327 "current loaded cache", cmCacheManager::INTERNAL);
330 // check to make sure the cache directory has not
332 if ( internal && this->GetCacheValue("CMAKE_CACHEFILE_DIR") )
334 std::string currentcwd = path;
335 std::string oldcwd = this->GetCacheValue("CMAKE_CACHEFILE_DIR");
336 cmSystemTools::ConvertToUnixSlashes(currentcwd);
337 currentcwd += "/CMakeCache.txt";
338 oldcwd += "/CMakeCache.txt";
339 if(!cmSystemTools::SameFile(oldcwd.c_str(), currentcwd.c_str()))
341 std::string message =
342 std::string("The current CMakeCache.txt directory ") +
343 currentcwd + std::string(" is different than the directory ") +
344 std::string(this->GetCacheValue("CMAKE_CACHEFILE_DIR")) +
345 std::string(" where CMakeCache.txt was created. This may result "
346 "in binaries being created in the wrong place. If you "
347 "are not sure, reedit the CMakeCache.txt");
348 cmSystemTools::Error(message.c_str());
354 //----------------------------------------------------------------------------
355 const char* cmCacheManager::PersistentProperties[] =
363 //----------------------------------------------------------------------------
364 bool cmCacheManager::ReadPropertyEntry(std::string const& entryKey,
367 // All property entries are internal.
368 if(e.Type != cmCacheManager::INTERNAL)
373 const char* end = entryKey.c_str() + entryKey.size();
374 for(const char** p = this->PersistentProperties; *p; ++p)
376 std::string::size_type plen = strlen(*p) + 1;
377 if(entryKey.size() > plen && *(end-plen) == '-' &&
378 strcmp(end-plen+1, *p) == 0)
380 std::string key = entryKey.substr(0, entryKey.size() - plen);
381 cmCacheManager::CacheIterator it = this->GetCacheIterator(key.c_str());
384 // Create an entry and store the property.
385 CacheEntry& ne = this->Cache[key];
386 ne.Properties.SetCMakeInstance(this->CMakeInstance);
387 ne.Type = cmCacheManager::UNINITIALIZED;
388 ne.SetProperty(*p, e.Value.c_str());
392 // Store this property on its entry.
393 it.SetProperty(*p, e.Value.c_str());
401 //----------------------------------------------------------------------------
402 void cmCacheManager::WritePropertyEntries(std::ostream& os,
403 CacheIterator const& i)
405 for(const char** p = this->PersistentProperties; *p; ++p)
407 if(const char* value = i.GetProperty(*p))
409 std::string helpstring = *p;
410 helpstring += " property for variable: ";
411 helpstring += i.GetName();
412 cmCacheManager::OutputHelpString(os, helpstring);
414 std::string key = i.GetName();
417 this->OutputKey(os, key);
419 this->OutputValue(os, value);
425 bool cmCacheManager::SaveCache(cmMakefile* mf)
427 return this->SaveCache(mf->GetHomeOutputDirectory());
431 bool cmCacheManager::SaveCache(const char* path)
433 std::string cacheFile = path;
434 cacheFile += "/CMakeCache.txt";
435 cmGeneratedFileStream fout(cacheFile.c_str());
436 fout.SetCopyIfDifferent(true);
439 cmSystemTools::Error("Unable to open cache file for save. ",
441 cmSystemTools::ReportLastSystemError("");
444 // before writing the cache, update the version numbers
447 sprintf(temp, "%d", cmVersion::GetMinorVersion());
448 this->AddCacheEntry("CMAKE_CACHE_MINOR_VERSION", temp,
449 "Minor version of cmake used to create the "
450 "current loaded cache", cmCacheManager::INTERNAL);
451 sprintf(temp, "%d", cmVersion::GetMajorVersion());
452 this->AddCacheEntry("CMAKE_CACHE_MAJOR_VERSION", temp,
453 "Major version of cmake used to create the "
454 "current loaded cache", cmCacheManager::INTERNAL);
455 sprintf(temp, "%d", cmVersion::GetPatchVersion());
456 this->AddCacheEntry("CMAKE_CACHE_PATCH_VERSION", temp,
457 "Patch version of cmake used to create the "
458 "current loaded cache", cmCacheManager::INTERNAL);
460 // Let us store the current working directory so that if somebody
461 // Copies it, he will not be surprised
462 std::string currentcwd = path;
463 if ( currentcwd[0] >= 'A' && currentcwd[0] <= 'Z' &&
464 currentcwd[1] == ':' )
466 // Cast added to avoid compiler warning. Cast is ok because
467 // value is guaranteed to fit in char by the above if...
468 currentcwd[0] = static_cast<char>(currentcwd[0] - 'A' + 'a');
470 cmSystemTools::ConvertToUnixSlashes(currentcwd);
471 this->AddCacheEntry("CMAKE_CACHEFILE_DIR", currentcwd.c_str(),
472 "This is the directory where this CMakeCache.txt"
473 " was created", cmCacheManager::INTERNAL);
475 fout << "# This is the CMakeCache file.\n"
476 << "# For build in directory: " << currentcwd << "\n";
477 cmCacheManager::CacheEntry* cmakeCacheEntry
478 = this->GetCacheEntry("CMAKE_COMMAND");
479 if ( cmakeCacheEntry )
481 fout << "# It was generated by CMake: " <<
482 cmakeCacheEntry->Value << std::endl;
485 fout << "# You can edit this file to change values found and used by cmake."
487 << "# If you do not want to change any of the values, simply exit the "
488 "editor." << std::endl
489 << "# If you do want to change a value, simply edit, save, and exit "
490 "the editor." << std::endl
491 << "# The syntax for the file is as follows:\n"
492 << "# KEY:TYPE=VALUE\n"
493 << "# KEY is the name of a variable in the cache.\n"
494 << "# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT "
495 "TYPE!." << std::endl
496 << "# VALUE is the current value for the KEY.\n\n";
498 fout << "########################\n";
499 fout << "# EXTERNAL cache entries\n";
500 fout << "########################\n";
503 for( std::map<cmStdString, CacheEntry>::const_iterator i =
504 this->Cache.begin(); i != this->Cache.end(); ++i)
506 const CacheEntry& ce = (*i).second;
507 CacheEntryType t = ce.Type;
511 // This should be added in, but is not for now.
512 cmSystemTools::Error("Cache entry \"", (*i).first.c_str(),
513 "\" is uninitialized");
516 else if(t != INTERNAL)
518 // Format is key:type=value
519 if(const char* help = ce.GetProperty("HELPSTRING"))
521 cmCacheManager::OutputHelpString(fout, help);
525 cmCacheManager::OutputHelpString(fout, "Missing description");
527 this->OutputKey(fout, i->first);
528 fout << ":" << cmCacheManagerTypes[t] << "=";
529 this->OutputValue(fout, ce.Value);
535 fout << "########################\n";
536 fout << "# INTERNAL cache entries\n";
537 fout << "########################\n";
540 for( cmCacheManager::CacheIterator i = this->NewIterator();
541 !i.IsAtEnd(); i.Next())
543 if ( !i.Initialized() )
548 CacheEntryType t = i.GetType();
549 this->WritePropertyEntries(fout, i);
550 if(t == cmCacheManager::INTERNAL)
552 // Format is key:type=value
553 if(const char* help = i.GetProperty("HELPSTRING"))
555 this->OutputHelpString(fout, help);
557 this->OutputKey(fout, i.GetName());
558 fout << ":" << cmCacheManagerTypes[t] << "=";
559 this->OutputValue(fout, i.GetValue());
565 std::string checkCacheFile = path;
566 checkCacheFile += cmake::GetCMakeFilesDirectory();
567 cmSystemTools::MakeDirectory(checkCacheFile.c_str());
568 checkCacheFile += "/cmake.check_cache";
569 std::ofstream checkCache(checkCacheFile.c_str());
572 cmSystemTools::Error("Unable to open check cache file for write. ",
573 checkCacheFile.c_str());
576 checkCache << "# This file is generated by cmake for dependency checking "
577 "of the CMakeCache.txt file\n";
581 bool cmCacheManager::DeleteCache(const char* path)
583 std::string cacheFile = path;
584 cmSystemTools::ConvertToUnixSlashes(cacheFile);
585 std::string cmakeFiles = cacheFile;
586 cacheFile += "/CMakeCache.txt";
587 if(cmSystemTools::FileExists(cacheFile.c_str()))
589 cmSystemTools::RemoveFile(cacheFile.c_str());
590 // now remove the files in the CMakeFiles directory
591 // this cleans up language cache files
592 cmakeFiles += cmake::GetCMakeFilesDirectory();
593 if(cmSystemTools::FileIsDirectory(cmakeFiles.c_str()))
595 cmSystemTools::RemoveADirectory(cmakeFiles.c_str());
601 void cmCacheManager::OutputKey(std::ostream& fout, std::string const& key)
603 // support : in key name by double quoting
604 const char* q = (key.find(':') != key.npos ||
605 key.find("//") == 0)? "\"" : "";
606 fout << q << key << q;
609 void cmCacheManager::OutputValue(std::ostream& fout, std::string const& value)
611 // if value has trailing space or tab, enclose it in single quotes
613 (value[value.size() - 1] == ' ' ||
614 value[value.size() - 1] == '\t'))
616 fout << '\'' << value << '\'';
624 void cmCacheManager::OutputHelpString(std::ostream& fout,
625 const std::string& helpString)
627 std::string::size_type end = helpString.size();
633 std::string::size_type pos = 0;
634 for (std::string::size_type i=0; i<=end; i++)
637 || (helpString[i]=='\n')
638 || ((i-pos >= 60) && (helpString[i]==' ')))
641 if (helpString[pos] == '\n')
646 oneLine = helpString.substr(pos, i - pos);
647 fout << oneLine.c_str() << "\n";
653 void cmCacheManager::RemoveCacheEntry(const char* key)
655 CacheEntryMap::iterator i = this->Cache.find(key);
656 if(i != this->Cache.end())
658 this->Cache.erase(i);
663 cmCacheManager::CacheEntry *cmCacheManager::GetCacheEntry(const char* key)
665 CacheEntryMap::iterator i = this->Cache.find(key);
666 if(i != this->Cache.end())
673 cmCacheManager::CacheIterator cmCacheManager::GetCacheIterator(
676 return CacheIterator(*this, key);
679 const char* cmCacheManager::GetCacheValue(const char* key) const
681 CacheEntryMap::const_iterator i = this->Cache.find(key);
682 if(i != this->Cache.end() &&
683 i->second.Initialized)
685 return i->second.Value.c_str();
691 void cmCacheManager::PrintCache(std::ostream& out) const
693 out << "=================================================" << std::endl;
694 out << "CMakeCache Contents:" << std::endl;
695 for(std::map<cmStdString, CacheEntry>::const_iterator i =
696 this->Cache.begin(); i != this->Cache.end(); ++i)
698 if((*i).second.Type != INTERNAL)
700 out << (*i).first.c_str() << " = " << (*i).second.Value.c_str()
705 out << "To change values in the CMakeCache, "
706 << std::endl << "edit CMakeCache.txt in your output directory.\n";
707 out << "=================================================" << std::endl;
711 void cmCacheManager::AddCacheEntry(const char* key,
713 const char* helpString,
716 CacheEntry& e = this->Cache[key];
717 e.Properties.SetCMakeInstance(this->CMakeInstance);
721 e.Initialized = true;
728 // make sure we only use unix style paths
729 if(type == FILEPATH || type == PATH)
731 if(e.Value.find(';') != e.Value.npos)
733 std::vector<std::string> paths;
734 cmSystemTools::ExpandListArgument(e.Value, paths);
735 const char* sep = "";
737 for(std::vector<std::string>::iterator i = paths.begin();
738 i != paths.end(); ++i)
740 cmSystemTools::ConvertToUnixSlashes(*i);
748 cmSystemTools::ConvertToUnixSlashes(e.Value);
751 e.SetProperty("HELPSTRING", helpString? helpString :
752 "(This variable does not exist and should not be used)");
753 if (this->Cache[key].Value == e.Value)
755 this->CMakeInstance->UnwatchUnusedCli(key);
757 this->Cache[key] = e;
760 bool cmCacheManager::CacheIterator::IsAtEnd() const
762 return this->Position == this->Container.Cache.end();
765 void cmCacheManager::CacheIterator::Begin()
767 this->Position = this->Container.Cache.begin();
770 bool cmCacheManager::CacheIterator::Find(const char* key)
772 this->Position = this->Container.Cache.find(key);
773 return !this->IsAtEnd();
776 void cmCacheManager::CacheIterator::Next()
778 if (!this->IsAtEnd())
784 void cmCacheManager::CacheIterator::SetValue(const char* value)
790 CacheEntry* entry = &this->GetEntry();
793 entry->Value = value;
794 entry->Initialized = true;
802 //----------------------------------------------------------------------------
803 bool cmCacheManager::CacheIterator::GetValueAsBool() const
805 return cmSystemTools::IsOn(this->GetEntry().Value.c_str());
808 //----------------------------------------------------------------------------
810 cmCacheManager::CacheEntry::GetProperty(const char* prop) const
812 if(strcmp(prop, "TYPE") == 0)
814 return cmCacheManagerTypes[this->Type];
816 else if(strcmp(prop, "VALUE") == 0)
818 return this->Value.c_str();
822 this->Properties.GetPropertyValue(prop, cmProperty::CACHE, c);
825 //----------------------------------------------------------------------------
826 void cmCacheManager::CacheEntry::SetProperty(const char* prop,
829 if(strcmp(prop, "TYPE") == 0)
831 this->Type = cmCacheManager::StringToType(value? value : "STRING");
833 else if(strcmp(prop, "VALUE") == 0)
835 this->Value = value? value : "";
839 this->Properties.SetProperty(prop, value, cmProperty::CACHE);
843 //----------------------------------------------------------------------------
844 void cmCacheManager::CacheEntry::AppendProperty(const char* prop,
848 if(strcmp(prop, "TYPE") == 0)
850 this->Type = cmCacheManager::StringToType(value? value : "STRING");
852 else if(strcmp(prop, "VALUE") == 0)
856 if(!this->Value.empty() && *value && !asString)
860 this->Value += value;
865 this->Properties.AppendProperty(prop, value, cmProperty::CACHE, asString);
869 //----------------------------------------------------------------------------
870 const char* cmCacheManager::CacheIterator::GetProperty(const char* prop) const
874 return this->GetEntry().GetProperty(prop);
879 //----------------------------------------------------------------------------
880 void cmCacheManager::CacheIterator::SetProperty(const char* p, const char* v)
884 this->GetEntry().SetProperty(p, v);
888 //----------------------------------------------------------------------------
889 void cmCacheManager::CacheIterator::AppendProperty(const char* p,
895 this->GetEntry().AppendProperty(p, v, asString);
899 //----------------------------------------------------------------------------
900 bool cmCacheManager::CacheIterator::GetPropertyAsBool(const char* prop) const
902 if(const char* value = this->GetProperty(prop))
904 return cmSystemTools::IsOn(value);
909 //----------------------------------------------------------------------------
910 void cmCacheManager::CacheIterator::SetProperty(const char* p, bool v)
912 this->SetProperty(p, v ? "ON" : "OFF");
915 //----------------------------------------------------------------------------
916 bool cmCacheManager::CacheIterator::PropertyExists(const char* prop) const
918 return this->GetProperty(prop)? true:false;
921 //----------------------------------------------------------------------------
922 bool cmCacheManager::NeedCacheCompatibility(int major, int minor)
924 // Compatibility is not needed if the cache version is zero because
925 // the cache was created or modified by the user.
926 if(this->CacheMajorVersion == 0)
931 // Compatibility is needed if the cache version is equal to or lower
932 // than the given version.
933 unsigned int actual_compat =
934 CMake_VERSION_ENCODE(this->CacheMajorVersion, this->CacheMinorVersion, 0);
935 return (actual_compat &&
936 actual_compat <= CMake_VERSION_ENCODE(major, minor, 0));
939 //----------------------------------------------------------------------------
940 void cmCacheManager::DefineProperties(cmake *cm)
943 ("ADVANCED", cmProperty::CACHE,
944 "True if entry should be hidden by default in GUIs.",
945 "This is a boolean value indicating whether the entry is considered "
946 "interesting only for advanced configuration. "
947 "The mark_as_advanced() command modifies this property."
951 ("HELPSTRING", cmProperty::CACHE,
952 "Help associated with entry in GUIs.",
953 "This string summarizes the purpose of an entry to help users set it "
954 "through a CMake GUI."
958 ("TYPE", cmProperty::CACHE,
959 "Widget type for entry in GUIs.",
960 "Cache entry values are always strings, but CMake GUIs present widgets "
961 "to help users set values. "
962 "The GUIs use this property as a hint to determine the widget type. "
963 "Valid TYPE values are:\n"
964 " BOOL = Boolean ON/OFF value.\n"
965 " PATH = Path to a directory.\n"
966 " FILEPATH = Path to a file.\n"
967 " STRING = Generic string value.\n"
968 " INTERNAL = Do not present in GUI at all.\n"
969 " STATIC = Value managed by CMake, do not change.\n"
970 " UNINITIALIZED = Type not yet specified.\n"
971 "Generally the TYPE of a cache entry should be set by the command "
972 "which creates it (set, option, find_library, etc.)."
976 ("MODIFIED", cmProperty::CACHE,
977 "Internal management property. Do not set or get.",
978 "This is an internal cache entry property managed by CMake to "
979 "track interactive user modification of entries. Ignore it."
983 ("STRINGS", cmProperty::CACHE,
984 "Enumerate possible STRING entry values for GUI selection.",
985 "For cache entries with type STRING, this enumerates a set of values. "
986 "CMake GUIs may use this to provide a selection widget instead of a "
987 "generic string entry field. "
988 "This is for convenience only. "
989 "CMake does not enforce that the value matches one of those listed."
993 ("VALUE", cmProperty::CACHE,
994 "Value of a cache entry.",
995 "This property maps to the actual value of a cache entry. "
996 "Setting this property always sets the value without checking, so "