| 10 | #include <language/duchain/declaration.h> |
| 11 | |
| 12 | static QSet<QString> initCommands() |
| 13 | { |
| 14 | QStringList ids = CMake::executeProcess(QStringLiteral("cmake"), QStringList(QStringLiteral("--help-command-list"))).split(QLatin1Char('\n')); |
| 15 | if (ids.isEmpty()) { |
| 16 | return {}; |
| 17 | } |
| 18 | const auto secondIt = ids.constBegin() + 1; |
| 19 | return QSet<QString>(secondIt, ids.constEnd()); |
| 20 | } |
| 21 | |
| 22 | // TODO: maybe share this again with codecompletionmodel and documentation |
| 23 | Q_GLOBAL_STATIC_WITH_ARGS(QSet<QString>, s_commands, (initCommands())) |
no test coverage detected