forked from qt-creator/qt-creator
CMake: Detect fileapi in cmake
Detect whether cmake supports fileapi or not. This is based on the version number since cmake upstream does not want to add a flag into the capabilities output:-/ Change-Id: I036adf65cbd1b171f0f98a7c86230a7ca33fff32 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
This commit is contained in:
@@ -248,6 +248,13 @@ bool CMakeTool::hasServerMode() const
|
||||
return m_introspection->m_hasServerMode;
|
||||
}
|
||||
|
||||
bool CMakeTool::hasFileApi() const
|
||||
{
|
||||
readInformation(QueryType::VERSION);
|
||||
return m_introspection->m_version.major > 3
|
||||
|| (m_introspection->m_version.major == 3 && m_introspection->m_version.minor >= 14);
|
||||
}
|
||||
|
||||
CMakeTool::Version CMakeTool::version() const
|
||||
{
|
||||
readInformation(QueryType::VERSION);
|
||||
|
@@ -99,6 +99,7 @@ public:
|
||||
QList<Generator> supportedGenerators() const;
|
||||
TextEditor::Keywords keywords();
|
||||
bool hasServerMode() const;
|
||||
bool hasFileApi() const;
|
||||
Version version() const;
|
||||
|
||||
bool isAutoDetected() const;
|
||||
|
Reference in New Issue
Block a user