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:
Nikolai Kosjar
2014-10-16 15:27:19 +02:00
parent 821f08a905
commit f07b876a93
4 changed files with 229 additions and 218 deletions

View File

@@ -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