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 GUI's 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 cmSystemTools::RemoveFile(cacheFile.c_str());
588 // now remove the files in the CMakeFiles directory
589 // this cleans up language cache files
590 cmsys::Directory dir;
591 cmakeFiles += cmake::GetCMakeFilesDirectory();
592 dir.Load(cmakeFiles.c_str());
593 for (unsigned long fileNum = 0;
594 fileNum < dir.GetNumberOfFiles();
598 FileIsDirectory(dir.GetFile(fileNum)))
600 std::string fullPath = cmakeFiles;
602 fullPath += dir.GetFile(fileNum);
603 cmSystemTools::RemoveFile(fullPath.c_str());
609 void cmCacheManager::OutputKey(std::ostream& fout, std::string const& key)
611 // support : in key name by double quoting
612 const char* q = (key.find(':') != key.npos ||
613 key.find("//") == 0)? "\"" : "";
614 fout << q << key << q;
617 void cmCacheManager::OutputValue(std::ostream& fout, std::string const& value)
619 // if value has trailing space or tab, enclose it in single quotes
621 (value[value.size() - 1] == ' ' ||
622 value[value.size() - 1] == '\t'))
624 fout << '\'' << value << '\'';
632 void cmCacheManager::OutputHelpString(std::ostream& fout,
633 const std::string& helpString)
635 std::string::size_type end = helpString.size();
641 std::string::size_type pos = 0;
642 for (std::string::size_type i=0; i<=end; i++)
645 || (helpString[i]=='\n')
646 || ((i-pos >= 60) && (helpString[i]==' ')))
649 if (helpString[pos] == '\n')
654 oneLine = helpString.substr(pos, i - pos);
655 fout << oneLine.c_str() << "\n";
661 void cmCacheManager::RemoveCacheEntry(const char* key)
663 CacheEntryMap::iterator i = this->Cache.find(key);
664 if(i != this->Cache.end())
666 this->Cache.erase(i);
671 cmCacheManager::CacheEntry *cmCacheManager::GetCacheEntry(const char* key)
673 CacheEntryMap::iterator i = this->Cache.find(key);
674 if(i != this->Cache.end())
681 cmCacheManager::CacheIterator cmCacheManager::GetCacheIterator(
684 return CacheIterator(*this, key);
687 const char* cmCacheManager::GetCacheValue(const char* key) const
689 CacheEntryMap::const_iterator i = this->Cache.find(key);
690 if(i != this->Cache.end() &&
691 i->second.Initialized)
693 return i->second.Value.c_str();
699 void cmCacheManager::PrintCache(std::ostream& out) const
701 out << "=================================================" << std::endl;
702 out << "CMakeCache Contents:" << std::endl;
703 for(std::map<cmStdString, CacheEntry>::const_iterator i =
704 this->Cache.begin(); i != this->Cache.end(); ++i)
706 if((*i).second.Type != INTERNAL)
708 out << (*i).first.c_str() << " = " << (*i).second.Value.c_str()
713 out << "To change values in the CMakeCache, "
714 << std::endl << "edit CMakeCache.txt in your output directory.\n";
715 out << "=================================================" << std::endl;
719 void cmCacheManager::AddCacheEntry(const char* key,
721 const char* helpString,
724 CacheEntry& e = this->Cache[key];
725 e.Properties.SetCMakeInstance(this->CMakeInstance);
729 e.Initialized = true;
736 // make sure we only use unix style paths
737 if(type == FILEPATH || type == PATH)
739 if(e.Value.find(';') != e.Value.npos)
741 std::vector<std::string> paths;
742 cmSystemTools::ExpandListArgument(e.Value, paths);
743 const char* sep = "";
745 for(std::vector<std::string>::iterator i = paths.begin();
746 i != paths.end(); ++i)
748 cmSystemTools::ConvertToUnixSlashes(*i);
756 cmSystemTools::ConvertToUnixSlashes(e.Value);
759 e.SetProperty("HELPSTRING", helpString? helpString :
760 "(This variable does not exist and should not be used)");
761 this->Cache[key] = e;
764 bool cmCacheManager::CacheIterator::IsAtEnd() const
766 return this->Position == this->Container.Cache.end();
769 void cmCacheManager::CacheIterator::Begin()
771 this->Position = this->Container.Cache.begin();
774 bool cmCacheManager::CacheIterator::Find(const char* key)
776 this->Position = this->Container.Cache.find(key);
777 return !this->IsAtEnd();
780 void cmCacheManager::CacheIterator::Next()
782 if (!this->IsAtEnd())
788 void cmCacheManager::CacheIterator::SetValue(const char* value)
794 CacheEntry* entry = &this->GetEntry();
797 entry->Value = value;
798 entry->Initialized = true;
806 //----------------------------------------------------------------------------
807 bool cmCacheManager::CacheIterator::GetValueAsBool() const
809 return cmSystemTools::IsOn(this->GetEntry().Value.c_str());
812 //----------------------------------------------------------------------------
814 cmCacheManager::CacheEntry::GetProperty(const char* prop) const
816 if(strcmp(prop, "TYPE") == 0)
818 return cmCacheManagerTypes[this->Type];
820 else if(strcmp(prop, "VALUE") == 0)
822 return this->Value.c_str();
826 this->Properties.GetPropertyValue(prop, cmProperty::CACHE, c);
829 //----------------------------------------------------------------------------
830 void cmCacheManager::CacheEntry::SetProperty(const char* prop,
833 if(strcmp(prop, "TYPE") == 0)
835 this->Type = cmCacheManager::StringToType(value? value : "STRING");
837 else if(strcmp(prop, "VALUE") == 0)
839 this->Value = value? value : "";
843 this->Properties.SetProperty(prop, value, cmProperty::CACHE);
847 //----------------------------------------------------------------------------
848 void cmCacheManager::CacheEntry::AppendProperty(const char* prop,
852 if(strcmp(prop, "TYPE") == 0)
854 this->Type = cmCacheManager::StringToType(value? value : "STRING");
856 else if(strcmp(prop, "VALUE") == 0)
860 if(!this->Value.empty() && *value && !asString)
864 this->Value += value;
869 this->Properties.AppendProperty(prop, value, cmProperty::CACHE, asString);
873 //----------------------------------------------------------------------------
874 const char* cmCacheManager::CacheIterator::GetProperty(const char* prop) const
878 return this->GetEntry().GetProperty(prop);
883 //----------------------------------------------------------------------------
884 void cmCacheManager::CacheIterator::SetProperty(const char* p, const char* v)
888 this->GetEntry().SetProperty(p, v);
892 //----------------------------------------------------------------------------
893 void cmCacheManager::CacheIterator::AppendProperty(const char* p,
899 this->GetEntry().AppendProperty(p, v, asString);
903 //----------------------------------------------------------------------------
904 bool cmCacheManager::CacheIterator::GetPropertyAsBool(const char* prop) const
906 if(const char* value = this->GetProperty(prop))
908 return cmSystemTools::IsOn(value);
913 //----------------------------------------------------------------------------
914 void cmCacheManager::CacheIterator::SetProperty(const char* p, bool v)
916 this->SetProperty(p, v ? "ON" : "OFF");
919 //----------------------------------------------------------------------------
920 bool cmCacheManager::CacheIterator::PropertyExists(const char* prop) const
922 return this->GetProperty(prop)? true:false;
925 //----------------------------------------------------------------------------
926 bool cmCacheManager::NeedCacheCompatibility(int major, int minor)
928 // Compatibility is not needed if the cache version is zero because
929 // the cache was created or modified by the user.
930 if(this->CacheMajorVersion == 0)
935 // Compatibility is needed if the cache version is equal to or lower
936 // than the given version.
937 unsigned int actual_compat =
938 CMake_VERSION_ENCODE(this->CacheMajorVersion, this->CacheMinorVersion, 0);
939 return (actual_compat &&
940 actual_compat <= CMake_VERSION_ENCODE(major, minor, 0));
943 //----------------------------------------------------------------------------
944 void cmCacheManager::DefineProperties(cmake *cm)
947 ("ADVANCED", cmProperty::CACHE,
948 "True if entry should be hidden by default in GUIs.",
949 "This is a boolean value indicating whether the entry is considered "
950 "interesting only for advanced configuration. "
951 "The mark_as_advanced() command modifies this property."
955 ("HELPSTRING", cmProperty::CACHE,
956 "Help associated with entry in GUIs.",
957 "This string summarizes the purpose of an entry to help users set it "
958 "through a CMake GUI."
962 ("TYPE", cmProperty::CACHE,
963 "Widget type for entry in GUIs.",
964 "Cache entry values are always strings, but CMake GUIs present widgets "
965 "to help users set values. "
966 "The GUIs use this property as a hint to determine the widget type. "
967 "Valid TYPE values are:\n"
968 " BOOL = Boolean ON/OFF value.\n"
969 " PATH = Path to a directory.\n"
970 " FILEPATH = Path to a file.\n"
971 " STRING = Generic string value.\n"
972 " INTERNAL = Do not present in GUI at all.\n"
973 " STATIC = Value managed by CMake, do not change.\n"
974 " UNINITIALIZED = Type not yet specified.\n"
975 "Generally the TYPE of a cache entry should be set by the command "
976 "which creates it (set, option, find_library, etc.)."
980 ("MODIFIED", cmProperty::CACHE,
981 "Internal management property. Do not set or get.",
982 "This is an internal cache entry property managed by CMake to "
983 "track interactive user modification of entries. Ignore it."
987 ("STRINGS", cmProperty::CACHE,
988 "Enumerate possible STRING entry values for GUI selection.",
989 "For cache entries with type STRING, this enumerates a set of values. "
990 "CMake GUIs may use this to provide a selection widget instead of a "
991 "generic string entry field. "
992 "This is for convenience only. "
993 "CMake does not enforce that the value matches one of those listed."
997 ("VALUE", cmProperty::CACHE,
998 "Value of a cache entry.",
999 "This property maps to the actual value of a cache entry. "
1000 "Setting this property always sets the value without checking, so "