aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/cmakeprojectmanager/cmaketool.h
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-06-18 11:31:46 +0200
committerTobias Hunger <tobias.hunger@qt.io>2019-06-20 13:42:02 +0000
commitc61c499970a25b2fc5d6e0fb7109afe9597b372b (patch)
tree72991cbce170a640c457d87e4bf58378cafa5176 /src/plugins/cmakeprojectmanager/cmaketool.h
parenta95eb53d3ba880efd880616a2725ac7657dffea2 (diff)
CMake: Add an option to override cmake reader type
Add an option to override the cmake reader type that is going to be used. By default the reader type is "auto" for autodetection, but that can get changed in the cmaketools.xml settings file. Other supported options are "tealeaf", "servermode" or "fileapi" and that will force that reader. You can also set QTC_CMAKE_IGNORE_FILEAPI=1 in your environment to force creator to ignore the existence of fileapi support in all cmake tools. Change-Id: I2006616312090ce2909154dc1966f7a8eaa2949a Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/cmakeprojectmanager/cmaketool.h')
-rw-r--r--src/plugins/cmakeprojectmanager/cmaketool.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmaketool.h b/src/plugins/cmakeprojectmanager/cmaketool.h
index 73044d8ba4..c8c29665c2 100644
--- a/src/plugins/cmakeprojectmanager/cmaketool.h
+++ b/src/plugins/cmakeprojectmanager/cmaketool.h
@@ -31,6 +31,7 @@
#include <texteditor/codeassist/keywordscompletionassist.h>
#include <utils/fileutils.h>
+#include <utils/optional.h>
#include <utils/synchronousprocess.h>
#include <QObject>
@@ -48,10 +49,9 @@ namespace Internal { class IntrospectionData; }
class CMAKE_EXPORT CMakeTool
{
public:
- enum Detection {
- ManualDetection,
- AutoDetection
- };
+ enum Detection { ManualDetection, AutoDetection };
+
+ enum ReaderType { TeaLeaf, ServerMode, FileApi };
struct Version
{
@@ -110,6 +110,8 @@ public:
void setPathMapper(const PathMapper &includePathMapper);
PathMapper pathMapper() const;
+ ReaderType readerType() const;
+
private:
enum class QueryType {
GENERATORS,
@@ -137,6 +139,8 @@ private:
bool m_isAutoDetected = false;
bool m_autoCreateBuildDirectory = false;
+ Utils::optional<ReaderType> m_readerType;
+
std::unique_ptr<Internal::IntrospectionData> m_introspection;
PathMapper m_pathMapper;