VS: Add static method to get the base of the registry

This commit is contained in:
Patrick Gansterer 2012-11-20 12:18:43 +01:00 committed by Brad King
parent d41d4d3d61
commit 332dc09d0d
2 changed files with 12 additions and 2 deletions

View File

@ -32,10 +32,17 @@ cmGlobalVisualStudioGenerator::~cmGlobalVisualStudioGenerator()
//----------------------------------------------------------------------------
std::string cmGlobalVisualStudioGenerator::GetRegistryBase()
{
return cmGlobalVisualStudioGenerator::GetRegistryBase(
this->GetIDEVersion());
}
//----------------------------------------------------------------------------
std::string cmGlobalVisualStudioGenerator::GetRegistryBase(
const char* version)
{
std::string key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\";
key += this->GetIDEVersion();
return key;
return key + version;
}
//----------------------------------------------------------------------------

View File

@ -65,6 +65,9 @@ public:
/** Get the top-level registry key for this VS version. */
std::string GetRegistryBase();
/** Get the top-level registry key for the given VS version. */
static std::string GetRegistryBase(const char* version);
/** Return true if the generated build tree may contain multiple builds.
i.e. "Can I build Debug and Release in the same tree?" */
virtual bool IsMultiConfig() { return true; }