diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index cac15b789..408127ba6 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -529,6 +529,10 @@ Settings MainWindow::GetCppcheckSettings() result.userDefines += ";"; result.userDefines += define.toStdString(); } + + // Only check the given -D configuration + if (!defines.isEmpty()) + result._maxConfigs = 1; } // Include directories (and files) are searched in listed order.