build: ship clang compiler header within Sourcetrail package on macOS and Linux

* replace path to local compiler headers with packaged ones in include path detection
* added app settings migration to replace local compiler header path with path to packaged headers
This commit is contained in:
Eberhard Graether
2018-06-18 14:08:50 +02:00
parent a1c146d439
commit f11be042a6
20 changed files with 121 additions and 22 deletions
+28
View File
@@ -0,0 +1,28 @@
#include "utility/utilityCxx.h"
#include "utility/ResourcePaths.h"
#include "utility/utilityApp.h"
namespace utility
{
std::vector<FilePath> replaceOrAddCxxCompilerHeaderPath(const std::vector<FilePath>& headerSearchPaths)
{
if (utility::getOsType() == OS_WINDOWS)
{
return headerSearchPaths;
}
std::vector<FilePath> newHeaderSearchPaths;
for (const FilePath& path : headerSearchPaths)
{
if (!path.getConcatenated(L"/stdarg.h").exists())
{
newHeaderSearchPaths.push_back(path);
}
}
newHeaderSearchPaths.push_back(ResourcePaths::getCxxCompilerHeaderPath().getCanonical());
return newHeaderSearchPaths;
}
}