diff --git a/src/plugins/cmakeprojectmanager/cmaketool.cpp b/src/plugins/cmakeprojectmanager/cmaketool.cpp index ac0ac0999e9..4109d2cea10 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketool.cpp @@ -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); diff --git a/src/plugins/cmakeprojectmanager/cmaketool.h b/src/plugins/cmakeprojectmanager/cmaketool.h index 85feaf41e5b..45af7ba329e 100644 --- a/src/plugins/cmakeprojectmanager/cmaketool.h +++ b/src/plugins/cmakeprojectmanager/cmaketool.h @@ -99,6 +99,7 @@ public: QList supportedGenerators() const; TextEditor::Keywords keywords(); bool hasServerMode() const; + bool hasFileApi() const; Version version() const; bool isAutoDetected() const;