Create VS generator GetRegistryBase method
This method returns the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\<version> A protected GetIDEVersion method retrieves the version-specific part of the key name.
This commit is contained in:
parent
33207a9a87
commit
09e398fa9f
|
@ -73,5 +73,7 @@ public:
|
||||||
virtual std::string GetUserMacrosRegKeyBase();
|
virtual std::string GetUserMacrosRegKeyBase();
|
||||||
virtual const char* GetCMakeCFGInitDirectory()
|
virtual const char* GetCMakeCFGInitDirectory()
|
||||||
{ return "$(ConfigurationName)";}
|
{ return "$(ConfigurationName)";}
|
||||||
|
protected:
|
||||||
|
virtual const char* GetIDEVersion() { return "10.0"; }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -88,6 +88,9 @@ public:
|
||||||
|
|
||||||
///! What is the configurations directory variable called?
|
///! What is the configurations directory variable called?
|
||||||
virtual const char* GetCMakeCFGInitDirectory() { return "$(IntDir)"; }
|
virtual const char* GetCMakeCFGInitDirectory() { return "$(IntDir)"; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual const char* GetIDEVersion() { return "6.0"; }
|
||||||
private:
|
private:
|
||||||
void GenerateConfigurations(cmMakefile* mf);
|
void GenerateConfigurations(cmMakefile* mf);
|
||||||
void WriteDSWFile(std::ostream& fout);
|
void WriteDSWFile(std::ostream& fout);
|
||||||
|
|
|
@ -57,6 +57,7 @@ public:
|
||||||
virtual std::string GetUserMacrosRegKeyBase();
|
virtual std::string GetUserMacrosRegKeyBase();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual const char* GetIDEVersion() { return "7.1"; }
|
||||||
virtual void AddPlatformDefinitions(cmMakefile* mf);
|
virtual void AddPlatformDefinitions(cmMakefile* mf);
|
||||||
virtual void WriteSLNFile(std::ostream& fout,
|
virtual void WriteSLNFile(std::ostream& fout,
|
||||||
cmLocalGenerator* root,
|
cmLocalGenerator* root,
|
||||||
|
|
|
@ -103,6 +103,8 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual const char* GetIDEVersion() { return "7.0"; }
|
||||||
|
|
||||||
static cmIDEFlagTable const* GetExtraFlagTableVS7();
|
static cmIDEFlagTable const* GetExtraFlagTableVS7();
|
||||||
virtual void OutputSLNFile(cmLocalGenerator* root,
|
virtual void OutputSLNFile(cmLocalGenerator* root,
|
||||||
std::vector<cmLocalGenerator*>& generators);
|
std::vector<cmLocalGenerator*>& generators);
|
||||||
|
|
|
@ -64,6 +64,7 @@ public:
|
||||||
virtual std::string GetUserMacrosRegKeyBase();
|
virtual std::string GetUserMacrosRegKeyBase();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
virtual const char* GetIDEVersion() { return "8.0"; }
|
||||||
|
|
||||||
virtual bool VSLinksDependencies() const { return false; }
|
virtual bool VSLinksDependencies() const { return false; }
|
||||||
|
|
||||||
|
|
|
@ -65,5 +65,7 @@ public:
|
||||||
* Studio?
|
* Studio?
|
||||||
*/
|
*/
|
||||||
virtual std::string GetUserMacrosRegKeyBase();
|
virtual std::string GetUserMacrosRegKeyBase();
|
||||||
|
protected:
|
||||||
|
virtual const char* GetIDEVersion() { return "9.0"; }
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -31,6 +31,14 @@ cmGlobalVisualStudioGenerator::~cmGlobalVisualStudioGenerator()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------------------------------
|
||||||
|
std::string cmGlobalVisualStudioGenerator::GetRegistryBase()
|
||||||
|
{
|
||||||
|
std::string key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\";
|
||||||
|
key += this->GetIDEVersion();
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmGlobalVisualStudioGenerator::Generate()
|
void cmGlobalVisualStudioGenerator::Generate()
|
||||||
{
|
{
|
||||||
|
|
|
@ -68,6 +68,8 @@ public:
|
||||||
bool TargetIsFortranOnly(cmTarget& t);
|
bool TargetIsFortranOnly(cmTarget& t);
|
||||||
const char* GetUtilityForTarget(cmTarget& target, const char*);
|
const char* GetUtilityForTarget(cmTarget& target, const char*);
|
||||||
|
|
||||||
|
/** Get the top-level registry key for this VS version. */
|
||||||
|
std::string GetRegistryBase();
|
||||||
protected:
|
protected:
|
||||||
void FixUtilityDepends();
|
void FixUtilityDepends();
|
||||||
|
|
||||||
|
@ -76,6 +78,7 @@ protected:
|
||||||
// below 8.
|
// below 8.
|
||||||
virtual bool VSLinksDependencies() const { return true; }
|
virtual bool VSLinksDependencies() const { return true; }
|
||||||
|
|
||||||
|
virtual const char* GetIDEVersion() = 0;
|
||||||
private:
|
private:
|
||||||
void FixUtilityDependsForTarget(cmTarget& target);
|
void FixUtilityDependsForTarget(cmTarget& target);
|
||||||
void CreateUtilityDependTarget(cmTarget& target);
|
void CreateUtilityDependTarget(cmTarget& target);
|
||||||
|
|
Loading…
Reference in New Issue