diff options
author | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-11-20 13:30:36 +0100 |
---|---|---|
committer | Nikolai Kosjar <nikolai.kosjar@qt.io> | 2017-11-21 10:05:31 +0000 |
commit | 2abf1f29cc9a17c030b4c402cb11f0526540e895 (patch) | |
tree | 9f85b0274901a5ba03524d42777bb3bdc6f00fee /src/plugins/clangcodemodel/clangutils.cpp | |
parent | 7186456fd5ac4f5da0c36ecb1c38d5bae07f8d8e (diff) | |
download | qt-creator-2abf1f29cc9a17c030b4c402cb11f0526540e895.tar.gz |
Clang: Add identifying macro Q_CREATOR_RUN
Use the same we use for the built-in code model.
This is useful for conditions of pragmas.
Task-number: QTCREATORBUG-16847
Change-Id: I4c83be46bb2b8a23e4c8f70d98e2b4c9572121ee
Reviewed-by: David Schulz <david.schulz@qt.io>
Diffstat (limited to 'src/plugins/clangcodemodel/clangutils.cpp')
-rw-r--r-- | src/plugins/clangcodemodel/clangutils.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/plugins/clangcodemodel/clangutils.cpp b/src/plugins/clangcodemodel/clangutils.cpp index 0058ee4023..1ad979578d 100644 --- a/src/plugins/clangcodemodel/clangutils.cpp +++ b/src/plugins/clangcodemodel/clangutils.cpp @@ -78,6 +78,12 @@ public: { } + void addToolchainAndProjectMacros() final + { + addMacros({ProjectExplorer::Macro("Q_CREATOR_RUN", "1")}); + CompilerOptionsBuilder::addToolchainAndProjectMacros(); + } + void addExtraOptions() final { addDummyUiHeaderOnDiskIncludePath(); |