CMake: Report whether generators support platforms
This commit is contained in:
parent
43a68a6dca
commit
4db08807db
|
@ -41,6 +41,9 @@ public:
|
||||||
|
|
||||||
/** Determine whether or not this generator supports toolsets */
|
/** Determine whether or not this generator supports toolsets */
|
||||||
virtual bool SupportsToolset() const = 0;
|
virtual bool SupportsToolset() const = 0;
|
||||||
|
|
||||||
|
/** Determine whether or not this generator supports platforms */
|
||||||
|
virtual bool SupportsPlatform() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
|
@ -71,6 +74,9 @@ public:
|
||||||
|
|
||||||
/** Determine whether or not this generator supports toolsets */
|
/** Determine whether or not this generator supports toolsets */
|
||||||
bool SupportsToolset() const CM_OVERRIDE { return T::SupportsToolset(); }
|
bool SupportsToolset() const CM_OVERRIDE { return T::SupportsToolset(); }
|
||||||
|
|
||||||
|
/** Determine whether or not this generator supports platforms */
|
||||||
|
bool SupportsPlatform() const CM_OVERRIDE { return T::SupportsPlatform(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -51,6 +51,12 @@ public:
|
||||||
*/
|
*/
|
||||||
static bool SupportsToolset() { return false; }
|
static bool SupportsToolset() { return false; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utilized by the generator factory to determine if this generator
|
||||||
|
* supports platforms.
|
||||||
|
*/
|
||||||
|
static bool SupportsPlatform() { return false; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to determine system information such as shared library
|
* Try to determine system information such as shared library
|
||||||
* extension, pthreads, byte order etc.
|
* extension, pthreads, byte order etc.
|
||||||
|
|
|
@ -80,6 +80,12 @@ public:
|
||||||
*/
|
*/
|
||||||
static bool SupportsToolset() { return false; }
|
static bool SupportsToolset() { return false; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utilized by the generator factory to determine if this generator
|
||||||
|
* supports platforms.
|
||||||
|
*/
|
||||||
|
static bool SupportsPlatform() { return false; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Write a build statement to @a os with the @a comment using
|
* Write a build statement to @a os with the @a comment using
|
||||||
* the @a rule the list of @a outputs files and inputs.
|
* the @a rule the list of @a outputs files and inputs.
|
||||||
|
|
|
@ -75,6 +75,12 @@ public:
|
||||||
*/
|
*/
|
||||||
static bool SupportsToolset() { return false; }
|
static bool SupportsToolset() { return false; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utilized by the generator factory to determine if this generator
|
||||||
|
* supports platforms.
|
||||||
|
*/
|
||||||
|
static bool SupportsPlatform() { return false; }
|
||||||
|
|
||||||
/** Get the documentation entry for this generator. */
|
/** Get the documentation entry for this generator. */
|
||||||
static void GetDocumentation(cmDocumentationEntry& entry);
|
static void GetDocumentation(cmDocumentationEntry& entry);
|
||||||
|
|
||||||
|
|
|
@ -80,6 +80,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SupportsToolset() const CM_OVERRIDE { return true; }
|
bool SupportsToolset() const CM_OVERRIDE { return true; }
|
||||||
|
bool SupportsPlatform() const CM_OVERRIDE { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
cmGlobalGeneratorFactory* cmGlobalVisualStudio10Generator::NewFactory()
|
cmGlobalGeneratorFactory* cmGlobalVisualStudio10Generator::NewFactory()
|
||||||
|
|
|
@ -92,6 +92,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SupportsToolset() const CM_OVERRIDE { return true; }
|
bool SupportsToolset() const CM_OVERRIDE { return true; }
|
||||||
|
bool SupportsPlatform() const CM_OVERRIDE { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory()
|
cmGlobalGeneratorFactory* cmGlobalVisualStudio11Generator::NewFactory()
|
||||||
|
|
|
@ -74,6 +74,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SupportsToolset() const CM_OVERRIDE { return true; }
|
bool SupportsToolset() const CM_OVERRIDE { return true; }
|
||||||
|
bool SupportsPlatform() const CM_OVERRIDE { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
cmGlobalGeneratorFactory* cmGlobalVisualStudio12Generator::NewFactory()
|
cmGlobalGeneratorFactory* cmGlobalVisualStudio12Generator::NewFactory()
|
||||||
|
|
|
@ -74,6 +74,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SupportsToolset() const CM_OVERRIDE { return true; }
|
bool SupportsToolset() const CM_OVERRIDE { return true; }
|
||||||
|
bool SupportsPlatform() const CM_OVERRIDE { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
cmGlobalGeneratorFactory* cmGlobalVisualStudio14Generator::NewFactory()
|
cmGlobalGeneratorFactory* cmGlobalVisualStudio14Generator::NewFactory()
|
||||||
|
|
|
@ -47,6 +47,12 @@ public:
|
||||||
*/
|
*/
|
||||||
static bool SupportsToolset() { return false; }
|
static bool SupportsToolset() { return false; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Utilized by the generator factory to determine if this generator
|
||||||
|
* supports platforms.
|
||||||
|
*/
|
||||||
|
static bool SupportsPlatform() { return false; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Try to determine system information such as shared library
|
* Try to determine system information such as shared library
|
||||||
* extension, pthreads, byte order etc.
|
* extension, pthreads, byte order etc.
|
||||||
|
|
|
@ -83,6 +83,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SupportsToolset() const CM_OVERRIDE { return false; }
|
bool SupportsToolset() const CM_OVERRIDE { return false; }
|
||||||
|
bool SupportsPlatform() const CM_OVERRIDE { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
cmGlobalGeneratorFactory* cmGlobalVisualStudio8Generator::NewFactory()
|
cmGlobalGeneratorFactory* cmGlobalVisualStudio8Generator::NewFactory()
|
||||||
|
|
|
@ -86,6 +86,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SupportsToolset() const CM_OVERRIDE { return false; }
|
bool SupportsToolset() const CM_OVERRIDE { return false; }
|
||||||
|
bool SupportsPlatform() const CM_OVERRIDE { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
cmGlobalGeneratorFactory* cmGlobalVisualStudio9Generator::NewFactory()
|
cmGlobalGeneratorFactory* cmGlobalVisualStudio9Generator::NewFactory()
|
||||||
|
|
|
@ -122,6 +122,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SupportsToolset() const CM_OVERRIDE { return true; }
|
bool SupportsToolset() const CM_OVERRIDE { return true; }
|
||||||
|
bool SupportsPlatform() const CM_OVERRIDE { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(cmake* cm,
|
cmGlobalXCodeGenerator::cmGlobalXCodeGenerator(cmake* cm,
|
||||||
|
|
|
@ -853,6 +853,7 @@ void cmake::GetRegisteredGenerators(std::vector<GeneratorInfo>& generators)
|
||||||
for (size_t j = 0; j < names.size(); ++j) {
|
for (size_t j = 0; j < names.size(); ++j) {
|
||||||
GeneratorInfo info;
|
GeneratorInfo info;
|
||||||
info.supportsToolset = (*i)->SupportsToolset();
|
info.supportsToolset = (*i)->SupportsToolset();
|
||||||
|
info.supportsPlatform = (*i)->SupportsPlatform();
|
||||||
info.name = names[j];
|
info.name = names[j];
|
||||||
generators.push_back(info);
|
generators.push_back(info);
|
||||||
}
|
}
|
||||||
|
@ -865,6 +866,7 @@ void cmake::GetRegisteredGenerators(std::vector<GeneratorInfo>& generators)
|
||||||
GeneratorInfo info;
|
GeneratorInfo info;
|
||||||
info.name = i->first;
|
info.name = i->first;
|
||||||
info.supportsToolset = false;
|
info.supportsToolset = false;
|
||||||
|
info.supportsPlatform = false;
|
||||||
generators.push_back(info);
|
generators.push_back(info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,7 @@ public:
|
||||||
{
|
{
|
||||||
std::string name;
|
std::string name;
|
||||||
bool supportsToolset;
|
bool supportsToolset;
|
||||||
|
bool supportsPlatform;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::map<std::string, cmInstalledFile> InstalledFilesMap;
|
typedef std::map<std::string, cmInstalledFile> InstalledFilesMap;
|
||||||
|
|
Loading…
Reference in New Issue