diff options
Diffstat (limited to 'xmake/rules/c++/openmp/load.lua')
| -rw-r--r-- | xmake/rules/c++/openmp/load.lua | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/xmake/rules/c++/openmp/load.lua b/xmake/rules/c++/openmp/load.lua index 6678e46e3..b217c377d 100644 --- a/xmake/rules/c++/openmp/load.lua +++ b/xmake/rules/c++/openmp/load.lua @@ -18,13 +18,10 @@ -- @file load.lua -- --- imports -import("core.tool.compiler") - -- main entry -function main(target, langkind) - local compiler_name = compiler.name(langkind) - local flag_name = langkind .. "flags" +function main(target, sourcekind) + local _, compiler_name = target:tool(sourcekind) + local flag_name = sourcekind == "cxx" and "cxxflags" or "cflags" if compiler_name == "cl" then target:add(flag_name, "/openmp") elseif compiler_name == "clang" or compiler_name == "clangxx" then |
