forked from qt-creator/qt-creator
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>
This commit is contained in:
@@ -78,6 +78,12 @@ public:
|
||||
{
|
||||
}
|
||||
|
||||
void addToolchainAndProjectMacros() final
|
||||
{
|
||||
addMacros({ProjectExplorer::Macro("Q_CREATOR_RUN", "1")});
|
||||
CompilerOptionsBuilder::addToolchainAndProjectMacros();
|
||||
}
|
||||
|
||||
void addExtraOptions() final
|
||||
{
|
||||
addDummyUiHeaderOnDiskIncludePath();
|
||||
|
@@ -54,7 +54,7 @@ public:
|
||||
virtual void enableExceptions();
|
||||
void addHeaderPathOptions();
|
||||
void addPrecompiledHeaderOptions(PchUsage pchUsage);
|
||||
void addToolchainAndProjectMacros();
|
||||
virtual void addToolchainAndProjectMacros();
|
||||
void addMacros(const ProjectExplorer::Macros ¯os);
|
||||
virtual void addLanguageOption(ProjectFile::Kind fileKind);
|
||||
virtual void addOptionsForLanguage(bool checkForBorlandExtensions = true);
|
||||
|
Reference in New Issue
Block a user