aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cmakeprojectmanager/cmaketool.cpp
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-06-05 15:05:29 +0200
committerTobias Hunger <tobias.hunger@qt.io>2019-06-06 14:33:17 +0000
commitaad9828dca8a61d1885f69ec4382df2f6d8d1e39 (patch)
treee5254b1db9766fedb474ea0cce2cb6038be3d1a9 /src/plugins/cmakeprojectmanager/cmaketool.cpp
parent6a3ec1928c4fc956abd0583ab39b42f193842db4 (diff)
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>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmaketool.cpp')
-rw-r--r--src/plugins/cmakeprojectmanager/cmaketool.cpp7
1 files changed, 7 insertions, 0 deletions
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);