From b370625fbf37fe5e957677ec4c04ec3503d0da90 Mon Sep 17 00:00:00 2001 From: Arthur LAURENT Date: Fri, 5 Aug 2022 04:40:47 +0200 Subject: Handle angle relative path --- xmake/rules/c++/modules/modules_support/msvc.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmake/rules/c++/modules/modules_support/msvc.lua') diff --git a/xmake/rules/c++/modules/modules_support/msvc.lua b/xmake/rules/c++/modules/modules_support/msvc.lua index 93eef7c8c..04d34f02c 100644 --- a/xmake/rules/c++/modules/modules_support/msvc.lua +++ b/xmake/rules/c++/modules/modules_support/msvc.lua @@ -174,7 +174,8 @@ function generate_user_headerunits(target, batchcmds, headerunits, opt) if headerunit.type == ":quote" then outputdir = path.join(cachedir, path.directory(path.relative(headerunit.path, projectdir))) else - outputdir = path.join(cachedir, path.directory(headerunit.path):sub(3)) + -- if path is relative then its a subtarget path + outputdir = path.join(cachedir, path.is_absolute(headerunit.path) and path.directory(headerunit.path):sub(3) or headerunit.path) end batchcmds:mkdir(outputdir) -- cgit v1.3.1