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
This commit is contained in:
@@ -34,5 +34,5 @@ FilePath ResourcePaths::getJavaPath()
|
||||
|
||||
FilePath ResourcePaths::getCxxCompilerHeaderPath()
|
||||
{
|
||||
return AppPath::getAppPath().concatenate(L"data/cxx/include/");
|
||||
return AppPath::getAppPath().concatenate(L"data/cxx/include/").getCanonical();
|
||||
}
|
||||
|
||||
@@ -1,30 +1,23 @@
|
||||
#include "utilityCxx.h"
|
||||
|
||||
#include "ResourcePaths.h"
|
||||
#include "utilityApp.h"
|
||||
|
||||
namespace utility
|
||||
{
|
||||
std::vector<FilePath> replaceOrAddCxxCompilerHeaderPath(const std::vector<FilePath>& headerSearchPaths)
|
||||
{
|
||||
std::vector<FilePath> newHeaderSearchPaths;
|
||||
const FilePath cxxCompilerHeaderPath = ResourcePaths::getCxxCompilerHeaderPath();
|
||||
|
||||
if (utility::getOsType() == OS_WINDOWS)
|
||||
for (const FilePath& path : headerSearchPaths)
|
||||
{
|
||||
newHeaderSearchPaths = headerSearchPaths;
|
||||
}
|
||||
else
|
||||
{
|
||||
for (const FilePath& path : headerSearchPaths)
|
||||
if (path != cxxCompilerHeaderPath)
|
||||
{
|
||||
if (!path.getConcatenated(L"/stdarg.h").exists())
|
||||
{
|
||||
newHeaderSearchPaths.push_back(path);
|
||||
}
|
||||
newHeaderSearchPaths.push_back(path);
|
||||
}
|
||||
}
|
||||
|
||||
newHeaderSearchPaths.push_back(ResourcePaths::getCxxCompilerHeaderPath().getCanonical());
|
||||
newHeaderSearchPaths.push_back(cxxCompilerHeaderPath);
|
||||
return newHeaderSearchPaths;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user