logic: added C/C++ project setup from Code::Blocks

* also changed xml elements in sourcegroup settings that specify the used language standard, so that one sourcegroup can maintain multiple language standards
* added migration and migrated sample projects
This commit is contained in:
mlangkabel
2018-06-08 12:10:38 +02:00
parent ce0a8a6444
commit 704808b26f
86 changed files with 2376 additions and 543 deletions
+19 -1
View File
@@ -3,6 +3,8 @@
#include "data/indexer/IndexerCommandCxxEmpty.h"
#include "settings/ApplicationSettings.h"
#include "settings/SourceGroupSettingsCxxEmpty.h"
#include "settings/SourceGroupSettingsWithCppStandard.h"
#include "settings/SourceGroupSettingsWithCStandard.h"
#include "utility/file/FileManager.h"
#include "utility/utility.h"
@@ -98,6 +100,22 @@ std::vector<std::shared_ptr<IndexerCommand>> SourceGroupCxxEmpty::getIndexerComm
const std::set<FilePath> indexedPaths = utility::toSet(m_settings->getSourcePathsExpandedAndAbsolute());
const std::set<FilePathFilter> excludeFilters = utility::toSet(m_settings->getExcludeFiltersExpandedAndAbsolute());
std::string languageStandard = SourceGroupSettingsWithCppStandard::getDefaultCppStandardStatic();
if (std::shared_ptr<SourceGroupSettingsWithCStandard> cSettings =
std::dynamic_pointer_cast<SourceGroupSettingsWithCStandard>(m_settings))
{
languageStandard = cSettings->getCStandard();
}
else if (std::shared_ptr<SourceGroupSettingsWithCppStandard> cppSettisngs =
std::dynamic_pointer_cast<SourceGroupSettingsWithCppStandard>(m_settings))
{
languageStandard = cppSettisngs->getCppStandard();
}
else
{
LOG_ERROR("Source group doesn't specify language standard. Falling back to \"" + languageStandard + "\".");
}
std::vector<std::shared_ptr<IndexerCommand>> indexerCommands;
for (const FilePath& sourcePath: getAllSourceFilePaths())
{
@@ -112,7 +130,7 @@ std::vector<std::shared_ptr<IndexerCommand>> SourceGroupCxxEmpty::getIndexerComm
systemHeaderSearchPaths,
frameworkSearchPaths,
compilerFlags,
m_settings->getStandard()
languageStandard
));
}
}