forked from qt-creator/qt-creator
Clang: Fix release build
* The QtTest include is not available in release builds. * Make the batch file mode only available in debug/test builds as that one uses test utilities that are only available in debug builds. Change-Id: I441c51ec00b14b81a396ad0199882cf46fff10b0 Reviewed-by: David Schulz <david.schulz@qt.io>
This commit is contained in:
@@ -98,11 +98,13 @@ void ClangCodeModelPlugin::extensionsInitialized()
|
||||
// For e.g. creation of profile-guided optimization builds.
|
||||
void ClangCodeModelPlugin::maybeHandleBatchFileAndExit() const
|
||||
{
|
||||
#ifdef WITH_TESTS
|
||||
const QString batchFilePath = QString::fromLocal8Bit(qgetenv("QTC_CLANG_BATCH"));
|
||||
if (!batchFilePath.isEmpty() && QTC_GUARD(QFileInfo::exists(batchFilePath))) {
|
||||
const bool runSucceeded = runClangBatchFile(batchFilePath);
|
||||
QCoreApplication::exit(!runSucceeded);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef WITH_TESTS
|
||||
|
||||
Reference in New Issue
Block a user