summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-11-10 00:40:03 +0800
committerruki <[email protected]>2020-11-10 11:33:27 +0800
commit6bd92e09bea0e6f1c707ab6bbf062f462b70c01d (patch)
tree0a4b18ceaa6cbdb7d896b7937425c438a437939c
parent40b38d7cd88d9a0c3b870f6995c01dbd95c69981 (diff)
add nf_includedir
-rw-r--r--xmake/modules/core/tools/cl.lua5
-rw-r--r--xmake/modules/core/tools/cparser.lua5
-rw-r--r--xmake/modules/core/tools/dmd.lua5
-rw-r--r--xmake/modules/core/tools/gcc.lua5
-rw-r--r--xmake/modules/core/tools/go.lua5
-rw-r--r--xmake/modules/core/tools/llvm_rc.lua5
-rw-r--r--xmake/modules/core/tools/ml.lua5
-rw-r--r--xmake/modules/core/tools/nasm.lua5
-rw-r--r--xmake/modules/core/tools/nvcc.lua5
-rw-r--r--xmake/modules/core/tools/rc.lua5
-rw-r--r--xmake/modules/core/tools/sdcc.lua5
-rw-r--r--xmake/modules/core/tools/swiftc.lua5
-rw-r--r--xmake/modules/core/tools/tcc.lua5
-rw-r--r--xmake/modules/core/tools/windres.lua5
-rw-r--r--xmake/modules/core/tools/yasm.lua5
15 files changed, 70 insertions, 5 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index 1144023c5..8e69319e1 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -256,6 +256,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(path.translate(dir))
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the c precompiled header flag
function nf_pcheader(self, pcheaderfile, target)
diff --git a/xmake/modules/core/tools/cparser.lua b/xmake/modules/core/tools/cparser.lua
index d8603da30..4c6ef5d7b 100644
--- a/xmake/modules/core/tools/cparser.lua
+++ b/xmake/modules/core/tools/cparser.lua
@@ -118,6 +118,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the link flag
function nf_link(self, lib)
return "-l" .. lib
diff --git a/xmake/modules/core/tools/dmd.lua b/xmake/modules/core/tools/dmd.lua
index baf0032e2..ad110c26b 100644
--- a/xmake/modules/core/tools/dmd.lua
+++ b/xmake/modules/core/tools/dmd.lua
@@ -97,6 +97,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the link flag
function nf_link(self, lib)
return "-L-l" .. lib
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index 5418ecf27..5ade06550 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -234,6 +234,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(path.translate(dir))
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return "-isystem " .. os.args(path.translate(dir))
+end
+
-- make the link flag
function nf_link(self, lib)
return "-l" .. lib
diff --git a/xmake/modules/core/tools/go.lua b/xmake/modules/core/tools/go.lua
index 0d3ef49db..aaa943063 100644
--- a/xmake/modules/core/tools/go.lua
+++ b/xmake/modules/core/tools/go.lua
@@ -83,6 +83,11 @@ function nf_includedir(self, dir)
return "-I " .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the linkdir flag
function nf_linkdir(self, dir)
return "-L " .. os.args(dir)
diff --git a/xmake/modules/core/tools/llvm_rc.lua b/xmake/modules/core/tools/llvm_rc.lua
index 0e455e483..4083d4139 100644
--- a/xmake/modules/core/tools/llvm_rc.lua
+++ b/xmake/modules/core/tools/llvm_rc.lua
@@ -42,6 +42,11 @@ function nf_includedir(self, dir)
return "/I " .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the compile arguments list
function compargv(self, sourcefile, objectfile, flags)
return self:program(), table.join(flags, "/FO", objectfile, sourcefile)
diff --git a/xmake/modules/core/tools/ml.lua b/xmake/modules/core/tools/ml.lua
index 0e79bc581..25ea112c7 100644
--- a/xmake/modules/core/tools/ml.lua
+++ b/xmake/modules/core/tools/ml.lua
@@ -90,6 +90,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the compile arguments list
function compargv(self, sourcefile, objectfile, flags)
return self:program(), table.join("-c", flags, "-Fo" .. os.args(objectfile), sourcefile)
diff --git a/xmake/modules/core/tools/nasm.lua b/xmake/modules/core/tools/nasm.lua
index 7dec451ec..9d790716b 100644
--- a/xmake/modules/core/tools/nasm.lua
+++ b/xmake/modules/core/tools/nasm.lua
@@ -73,6 +73,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the compile arguments list
function _compargv1(self, sourcefile, objectfile, flags)
return self:program(), table.join(flags, "-o", objectfile, sourcefile)
diff --git a/xmake/modules/core/tools/nvcc.lua b/xmake/modules/core/tools/nvcc.lua
index d5a7ef6d2..c16643066 100644
--- a/xmake/modules/core/tools/nvcc.lua
+++ b/xmake/modules/core/tools/nvcc.lua
@@ -201,6 +201,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the link flag
function nf_link(self, lib)
return "-l" .. lib
diff --git a/xmake/modules/core/tools/rc.lua b/xmake/modules/core/tools/rc.lua
index 2130504d2..5ca3df027 100644
--- a/xmake/modules/core/tools/rc.lua
+++ b/xmake/modules/core/tools/rc.lua
@@ -46,6 +46,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the compile arguments list
function compargv(self, sourcefile, objectfile, flags)
return self:program(), table.join(flags, "-Fo" .. objectfile, sourcefile)
diff --git a/xmake/modules/core/tools/sdcc.lua b/xmake/modules/core/tools/sdcc.lua
index 89739c7cf..0acb12099 100644
--- a/xmake/modules/core/tools/sdcc.lua
+++ b/xmake/modules/core/tools/sdcc.lua
@@ -136,6 +136,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the link flag
function nf_link(self, lib)
return "-l" .. lib
diff --git a/xmake/modules/core/tools/swiftc.lua b/xmake/modules/core/tools/swiftc.lua
index 26024af0b..ea1939f10 100644
--- a/xmake/modules/core/tools/swiftc.lua
+++ b/xmake/modules/core/tools/swiftc.lua
@@ -140,11 +140,6 @@ function nf_vectorext(self, extension)
return maps[extension]
end
--- make the includedir flag
-function nf_includedir(self, dir)
- return "-Xcc -I" .. os.args(dir)
-end
-
-- make the define flag
function nf_define(self, macro)
return "-Xcc -D" .. macro
diff --git a/xmake/modules/core/tools/tcc.lua b/xmake/modules/core/tools/tcc.lua
index 271792ffe..a9c0abfc0 100644
--- a/xmake/modules/core/tools/tcc.lua
+++ b/xmake/modules/core/tools/tcc.lua
@@ -100,6 +100,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the link flag
function nf_link(self, lib)
return "-l" .. lib
diff --git a/xmake/modules/core/tools/windres.lua b/xmake/modules/core/tools/windres.lua
index e9fe0935f..78792d720 100644
--- a/xmake/modules/core/tools/windres.lua
+++ b/xmake/modules/core/tools/windres.lua
@@ -42,6 +42,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the compile arguments list
function compargv(self, sourcefile, objectfile, flags)
return self:program(), table.join(flags, sourcefile, objectfile)
diff --git a/xmake/modules/core/tools/yasm.lua b/xmake/modules/core/tools/yasm.lua
index 02832be7f..e6fa8e160 100644
--- a/xmake/modules/core/tools/yasm.lua
+++ b/xmake/modules/core/tools/yasm.lua
@@ -73,6 +73,11 @@ function nf_includedir(self, dir)
return "-I" .. os.args(dir)
end
+-- make the sysincludedir flag
+function nf_sysincludedir(self, dir)
+ return nf_includedir(self, dir)
+end
+
-- make the compile arguments list
function _compargv1(self, sourcefile, objectfile, flags)
return self:program(), table.join(flags, "-o", objectfile, sourcefile)