From 9ae41ea12f728c751646b8dc33109b0ee028ad4c Mon Sep 17 00:00:00 2001 From: avaicode Date: Sun, 16 Oct 2016 01:12:42 +0800 Subject: Fixed a problem about name-clash of object file --- xmake/core/project/target.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 1e687b8f2..fa5e32e15 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -283,7 +283,8 @@ function target:objectfiles() sourcefile = sourcefile:gsub(target.filename("([%w_]+)", "static"):gsub("%.", "%%.") .. "$", "%1/*") -- make object file - local objectfile = string.format("%s/%s/%s/%s", objectdir, self:name(), path.directory(sourcefile), target.filename(path.basename(sourcefile), "object")) + -- full file name(not base) to avoid name-clash of object file + local objectfile = string.format("%s/%s/%s/%s", objectdir, self:name(), path.directory(sourcefile), target.filename(sourcefile, "object")) -- translate path -- -- cgit v1.3.1