diff options
| author | xq114 <[email protected]> | 2022-02-24 21:54:31 +0800 |
|---|---|---|
| committer | xq114 <[email protected]> | 2022-02-24 21:54:31 +0800 |
| commit | 813e10fd6cb29ca692e2994b54a1ea39a1b48a19 (patch) | |
| tree | 92506c3018418cd00669c70718274dc11cb5e69b /xmake/plugins | |
| parent | dde475a0406409cab324728c143646b34faea1e1 (diff) | |
improve cmake generator
Diffstat (limited to 'xmake/plugins')
| -rw-r--r-- | xmake/plugins/project/cmake/cmakelists.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/xmake/plugins/project/cmake/cmakelists.lua b/xmake/plugins/project/cmake/cmakelists.lua index 925a4659c..7b1fe3167 100644 --- a/xmake/plugins/project/cmake/cmakelists.lua +++ b/xmake/plugins/project/cmake/cmakelists.lua @@ -65,8 +65,7 @@ end function _get_project_languages(targets) local languages = {} for _, target in pairs(targets) do - for _, sourcebatch in pairs(target:sourcebatches()) do - local sourcekind = sourcebatch.sourcekind + for _, sourcekind in ipairs(target:sourcekinds()) do if sourcekind == "cc" then table.insert(languages, "C") elseif sourcekind == "cxx" then table.insert(languages, "CXX") elseif sourcekind == "as" then table.insert(languages, "ASM") |
