diff options
| author | Arthur LAURENT <[email protected]> | 2024-02-02 15:42:11 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2024-02-02 15:42:11 +0100 |
| commit | 6d4f1389c3a8cba0e5ccd9370595183ffe16877c (patch) | |
| tree | e8613eec7e006ab82172c8173ab121b2160ebdb6 /xmake/rules/c++/modules | |
| parent | 99197a6ffd65bebd814845033548e4012875c313 (diff) | |
use find_file instead of os.files
Diffstat (limited to 'xmake/rules/c++/modules')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang/compiler_support.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang/compiler_support.lua b/xmake/rules/c++/modules/modules_support/clang/compiler_support.lua index 3005621d0..1f4df5013 100644 --- a/xmake/rules/c++/modules/modules_support/clang/compiler_support.lua +++ b/xmake/rules/c++/modules/modules_support/clang/compiler_support.lua @@ -23,6 +23,7 @@ import("core.base.semver") import("core.base.option") import("core.base.json") import("lib.detect.find_tool") +import("lib.detect.find_file") import(".compiler_support", {inherit = true}) -- get includedirs for stl headers @@ -197,7 +198,6 @@ function get_clang_scan_deps(target) return clang_scan_deps or nil end --- not supported atm function get_stdmodules(target) if target:policy("build.c++.modules.std") then local cpplib = _get_cpplibrary_name(target) @@ -205,7 +205,7 @@ function get_stdmodules(target) if cpplib == "c++" then local clang_path = path.directory(get_clang_path(target)) local clang_lib_path = path.normalize(path.join(clang_path, "..", "lib")) - local modules_json_path = os.files(path.join(clang_lib_path, "**.modules.json"))[1] + local modules_json_path = find_file("**.modules.json", clang_lib_path) if modules_json_path then local modules_json = json.decode(io.readfile(modules_json_path)) |
