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:
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user