mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
ide: cpp: Linux sys includes #1058, some more ignores
git-svn-id: svn://ultimatepp.org/upp/trunk@8435 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
22af95ab6a
commit
75304bcf39
2 changed files with 22 additions and 3 deletions
|
|
@ -19,7 +19,10 @@ String GetStdConfig()
|
|||
"__out;__in;__inout;__deref_in;__deref_inout;__deref_out;"
|
||||
"__pragma(...);__pascal;_far;_pascal;_cdecl;"
|
||||
"__AuToQuOtE;__xin;__xout;__export;"
|
||||
"__clrcall;__alignof(...)";
|
||||
"__clrcall;__alignof(...);"
|
||||
|
||||
"__asm__(...);__asm(...);__restrict;__inline;__typeof;"
|
||||
;
|
||||
ValueMap json;
|
||||
ValueArray va;
|
||||
Vector<String> h = Split(ns, ';');
|
||||
|
|
|
|||
|
|
@ -432,9 +432,25 @@ String Ide::GetIncludePath()
|
|||
{
|
||||
SetupDefaultMethod();
|
||||
VectorMap<String, String> bm = GetMethodVars(method);
|
||||
String include = GetVar("UPP") + ';' + bm.Get("INCLUDE", "")
|
||||
String include = GetVar("UPP") + ';' + bm.Get("INCLUDE", "");
|
||||
#ifdef PLATFORM_POSIX
|
||||
+ ";/usr/include;/usr/local/include"
|
||||
static String sys_includes;
|
||||
ONCELOCK {
|
||||
Index<String> r;
|
||||
for(int pass = 0; pass < 2; pass++) {
|
||||
String h = Sys(pass ? "clang -v -x c++ -E /dev/null" : "gcc -v -x c++ -E /dev/null");
|
||||
Vector<String> ln = Split(h, '\n');
|
||||
for(int i = 0; i < ln.GetCount(); i++) {
|
||||
String dir = TrimBoth(ln[i]);
|
||||
if(DirectoryExists(dir))
|
||||
r.FindAdd(NormalizePath(dir));
|
||||
}
|
||||
}
|
||||
r.FindAdd("/usr/include");
|
||||
r.FindAdd("/usr/local/include");
|
||||
sys_includes = Join(r.GetKeys(), ";");
|
||||
}
|
||||
MergeWith(include, ";", sys_includes);
|
||||
#endif
|
||||
;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue