forked from qt-creator/qt-creator
Move some functions from ClangCodeModel to CppTools
Most of the functions were quite generic and not specific to clang. Change-Id: I160cfeb7eca5b69ad6a8932a4f76db5bf5c1d42d Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
@@ -41,6 +41,8 @@
|
||||
#include <QPointer>
|
||||
#include <QSet>
|
||||
|
||||
#include <functional>
|
||||
|
||||
namespace CppTools {
|
||||
|
||||
class CPPTOOLS_EXPORT ProjectPart
|
||||
@@ -191,6 +193,22 @@ private:
|
||||
QStringList m_cFlags, m_cxxFlags;
|
||||
};
|
||||
|
||||
class CPPTOOLS_EXPORT CompilerOptionsBuilder
|
||||
{
|
||||
public:
|
||||
typedef std::function<bool (const QString &)> IsBlackListed;
|
||||
static QStringList createHeaderPathOptions(const ProjectPart::HeaderPaths &headerPaths,
|
||||
IsBlackListed isBlackListed = IsBlackListed());
|
||||
|
||||
static QStringList createDefineOptions(const QByteArray &defines,
|
||||
bool toolchainDefines = false);
|
||||
|
||||
static QStringList createLanguageOption(ProjectFile::Kind fileKind, bool objcExt);
|
||||
static QStringList createOptionsForLanguage(ProjectPart::LanguageVersion languageVersion,
|
||||
ProjectPart::LanguageExtensions languageExtensions,
|
||||
bool checkForBorlandExtensions = true);
|
||||
};
|
||||
|
||||
} // namespace CppTools
|
||||
|
||||
#endif // CPPPROJECTPART_H
|
||||
|
||||
Reference in New Issue
Block a user