Extract generators from 'cmake --help'

This commit is contained in:
Shohei YOSHIDA 2022-11-02 12:01:16 +09:00
parent 57c868face
commit 4bf24327ba
No known key found for this signature in database
GPG Key ID: C9A1BB11BB940CF2
1 changed files with 2 additions and 17 deletions

View File

@ -467,23 +467,8 @@ _cmake_define_property_values() {
return ret
}
local _cmake_generator_list
_cmake_generator_list=(
'Green Hills MULTI'
'Unix Makefiles'
'Ninja'
'Ninja Multi-Config'
'CodeBlocks - Ninja'
'CodeBlocks - Unix Makefiles'
'CodeLite - Ninja'
'CodeLite - Unix Makefiles'
'Eclipse CDT4 - Ninja'
'Eclipse CDT4 - Unix Makefiles'
'Kate - Ninja'
'Kate - Unix Makefiless'
'Sublime Text 2 - Ninja'
'Sublime Text 2 - Unix Makefiles'
)
local -a _cmake_generator_list
_cmake_generator_list=(${(f)"$(cmake --help | awk '/^Generators/{flag=1} flag && /^[* ] [^ ]/ {sub(/^[* ] /, ""); sub(/=.*$/, ""); sub(/\[arch\]/, ""); sub(/ *$/, ""); print}')"})
# -----------------
# _cmake_generators