diff options
| author | ruki <[email protected]> | 2020-10-17 00:37:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-10-17 00:37:54 +0800 |
| commit | dae7f831925340293a418056703d0f5ed1abb97d (patch) | |
| tree | 59152adf146485ee1feecb75e1286c2f32bb9f29 /xmake/rules/c++/openmp/load.lua | |
| parent | d482b1f6dc82ed80161600f2697ca33183dd02a2 (diff) | |
improve openmp
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 |
