diff --git a/lib/preprocessor.cpp b/lib/preprocessor.cpp index da4cc5278..9d0f47a25 100644 --- a/lib/preprocessor.cpp +++ b/lib/preprocessor.cpp @@ -365,8 +365,10 @@ std::set Preprocessor::getConfigs(const simplecpp::TokenList &token ::getConfigs(tokens, defined, _settings.userDefines, _settings.userUndefs, ret); - for (std::map::const_iterator it = tokenlists.begin(); it != tokenlists.end(); ++it) - ::getConfigs(*(it->second), defined, _settings.userDefines, _settings.userUndefs, ret); + for (std::map::const_iterator it = tokenlists.begin(); it != tokenlists.end(); ++it) { + if (!_settings.configurationExcluded(it->first)) + ::getConfigs(*(it->second), defined, _settings.userDefines, _settings.userUndefs, ret); + } return ret; } diff --git a/lib/settings.h b/lib/settings.h index ccef10a45..9be0d4d9f 100644 --- a/lib/settings.h +++ b/lib/settings.h @@ -247,7 +247,7 @@ public: ImportProject project; /** - * @brief return true if a file is to be excluded from configuration checking + * @brief return true if a included file is to be excluded in Preprocessor::getConfigs * @return true for the file to be excluded. */ bool configurationExcluded(const std::string &file) const {