Files
Sourcetrail/src/lib/utility/utilityCxx.cpp
T
Eberhard Graether 7d30709306 logic: Fixes and improvements for C/C++ compiler header path handling
* Always add compiler header path when prefilling on first start, regardless of successful detection
* Show compiler header path in path list box on top and readonly
* Prepend compiler header path on Windows in system header path compiler flags, append otherwise
* Show warning when saving ApplicationSettings if compiler header path is not in global include paths
* Show warning when saving ApplicationSettings if there is another path containing compiler headers
2019-01-21 15:18:31 +01:00

24 lines
553 B
C++

#include "utilityCxx.h"
#include "ResourcePaths.h"
namespace utility
{
std::vector<FilePath> replaceOrAddCxxCompilerHeaderPath(const std::vector<FilePath>& headerSearchPaths)
{
std::vector<FilePath> newHeaderSearchPaths;
const FilePath cxxCompilerHeaderPath = ResourcePaths::getCxxCompilerHeaderPath();
for (const FilePath& path : headerSearchPaths)
{
if (path != cxxCompilerHeaderPath)
{
newHeaderSearchPaths.push_back(path);
}
}
newHeaderSearchPaths.push_back(cxxCompilerHeaderPath);
return newHeaderSearchPaths;
}
}