diff options
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/common.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/common.lua | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/xmake/rules/c++/modules/modules_support/common.lua b/xmake/rules/c++/modules/modules_support/common.lua index a2e06ff69..65267bcbd 100644 --- a/xmake/rules/c++/modules/modules_support/common.lua +++ b/xmake/rules/c++/modules/modules_support/common.lua @@ -728,20 +728,10 @@ end function get_outputdir(target, module) local cachedir = modules_cachedir(target) - local modulepath = module.path or module - local cached = localcache():get2("modules_paths", modulepath) - if cached then - if not os.exists(cached) then - os.mkdir(cached) - end - return cached - else - local modulehash = get_modulehash(target, modulepath) - local moduledir = path.join(cachedir, modulehash) - localcache():set2("modules_paths", modulepath, moduledir) - if not os.exists(moduledir) then - os.mkdir(moduledir) - end - return moduledir + local modulehash = get_modulehash(target, module.path or module) + local outputdir = path.join(cachedir, modulehash) + if not os.exists(outputdir) then + os.mkdir(outputdir) end + return outputdir end |
