ui: Added compilation database loading via project wizzard
This commit is contained in:
@@ -31,19 +31,11 @@ std::vector<std::string> SolutionParserCompilationDatabase::getProjectItems()
|
||||
|
||||
std::vector<std::string> SolutionParserCompilationDatabase::getIncludePaths()
|
||||
{
|
||||
if(m_searchPaths.empty())
|
||||
{
|
||||
parseDatabase();
|
||||
}
|
||||
return m_searchPaths;
|
||||
}
|
||||
|
||||
std::vector<std::string> SolutionParserCompilationDatabase::getFrameworkPaths()
|
||||
{
|
||||
if(m_searchPaths.empty())
|
||||
{
|
||||
parseDatabase();
|
||||
}
|
||||
return m_frameworkPaths;
|
||||
}
|
||||
|
||||
@@ -89,6 +81,11 @@ void SolutionParserCompilationDatabase::parseDatabase()
|
||||
{
|
||||
m_searchPaths.push_back(p);
|
||||
}
|
||||
|
||||
for(std::string p : frameworkPaths)
|
||||
{
|
||||
m_frameworkPaths.push_back(p);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -28,14 +28,16 @@ public:
|
||||
virtual std::vector<std::string> getIncludePaths();
|
||||
std::vector<std::string> getFrameworkPaths();
|
||||
|
||||
void parseDatabase();
|
||||
|
||||
private:
|
||||
std::shared_ptr<clang::tooling::JSONCompilationDatabase> m_database;
|
||||
void parseDatabase();
|
||||
bool m_parsed;
|
||||
clang::tooling::JSONCompilationDatabase* getDatabase();
|
||||
std::vector<std::string> m_searchPaths;
|
||||
std::vector<std::string> m_frameworkPaths;
|
||||
std::string getIncludePath(const std::string& argument, const std::string& dir);
|
||||
|
||||
std::shared_ptr<clang::tooling::JSONCompilationDatabase> m_database;
|
||||
|
||||
std::vector<std::string> m_searchPaths;
|
||||
std::vector<std::string> m_frameworkPaths;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user