mirror of
https://github.com/reactos/CMake.git
synced 2025-02-20 11:52:04 +00:00
VS: Convert GetIDEVersion to non-virtual table lookup
This commit is contained in:
parent
d07f453f39
commit
03f74a16cd
@ -140,8 +140,6 @@ protected:
|
||||
virtual bool SelectWindowsPhoneToolset(std::string& toolset) const;
|
||||
virtual bool SelectWindowsStoreToolset(std::string& toolset) const;
|
||||
|
||||
const char* GetIDEVersion() const override { return "10.0"; }
|
||||
|
||||
std::string const& GetMSBuildCommand();
|
||||
|
||||
cmIDEFlagTable const* LoadFlagTable(std::string const& flagTableName,
|
||||
|
@ -43,7 +43,6 @@ protected:
|
||||
bool IsWindowsPhoneToolsetInstalled() const;
|
||||
bool IsWindowsStoreToolsetInstalled() const;
|
||||
|
||||
const char* GetIDEVersion() const override { return "11.0"; }
|
||||
bool UseFolderProperty() const override;
|
||||
static std::set<std::string> GetInstalledWindowsCESDKs();
|
||||
|
||||
|
@ -43,7 +43,6 @@ protected:
|
||||
// of the toolset is installed
|
||||
bool IsWindowsPhoneToolsetInstalled() const;
|
||||
bool IsWindowsStoreToolsetInstalled() const;
|
||||
const char* GetIDEVersion() const override { return "12.0"; }
|
||||
|
||||
private:
|
||||
class Factory;
|
||||
|
@ -39,7 +39,6 @@ protected:
|
||||
// version of the toolset.
|
||||
virtual std::string GetWindows10SDKMaxVersion() const;
|
||||
|
||||
const char* GetIDEVersion() const override { return "14.0"; }
|
||||
virtual bool SelectWindows10SDK(cmMakefile* mf, bool required);
|
||||
|
||||
// Used to verify that the Desktop toolset for the current generator is
|
||||
|
@ -37,8 +37,6 @@ protected:
|
||||
bool InitializeWindows(cmMakefile* mf) override;
|
||||
bool SelectWindowsStoreToolset(std::string& toolset) const override;
|
||||
|
||||
const char* GetIDEVersion() const override { return "15.0"; }
|
||||
|
||||
// Used to verify that the Desktop toolset for the current generator is
|
||||
// installed on the machine.
|
||||
bool IsWindowsDesktopToolsetInstalled() const override;
|
||||
|
@ -49,7 +49,6 @@ public:
|
||||
|
||||
protected:
|
||||
void AddExtraIDETargets() override;
|
||||
const char* GetIDEVersion() const override { return "8.0"; }
|
||||
|
||||
std::string FindDevEnvCommand() override;
|
||||
|
||||
|
@ -36,9 +36,6 @@ public:
|
||||
*/
|
||||
std::string GetUserMacrosRegKeyBase() override;
|
||||
|
||||
protected:
|
||||
const char* GetIDEVersion() const override { return "9.0"; }
|
||||
|
||||
private:
|
||||
class Factory;
|
||||
friend class Factory;
|
||||
|
@ -43,6 +43,25 @@ void cmGlobalVisualStudioGenerator::SetVersion(VSVersion v)
|
||||
this->Version = v;
|
||||
}
|
||||
|
||||
const char* cmGlobalVisualStudioGenerator::GetIDEVersion() const
|
||||
{
|
||||
switch (this->Version) {
|
||||
case cmGlobalVisualStudioGenerator::VS9:
|
||||
return "9.0";
|
||||
case cmGlobalVisualStudioGenerator::VS10:
|
||||
return "10.0";
|
||||
case cmGlobalVisualStudioGenerator::VS11:
|
||||
return "11.0";
|
||||
case cmGlobalVisualStudioGenerator::VS12:
|
||||
return "12.0";
|
||||
case cmGlobalVisualStudioGenerator::VS14:
|
||||
return "14.0";
|
||||
case cmGlobalVisualStudioGenerator::VS15:
|
||||
return "15.0";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
std::string cmGlobalVisualStudioGenerator::GetRegistryBase()
|
||||
{
|
||||
return cmGlobalVisualStudioGenerator::GetRegistryBase(this->GetIDEVersion());
|
||||
|
@ -137,7 +137,7 @@ protected:
|
||||
// below 8.
|
||||
virtual bool VSLinksDependencies() const { return true; }
|
||||
|
||||
virtual const char* GetIDEVersion() const = 0;
|
||||
const char* GetIDEVersion() const;
|
||||
|
||||
bool ComputeTargetDepends() override;
|
||||
class VSDependSet : public std::set<std::string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user