Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
fixed according to alamaison#17
Browse files Browse the repository at this point in the history
  • Loading branch information
sunziping2016 committed Mar 16, 2022
1 parent a7cf9e4 commit 77d4a5f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmake-project.el
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,15 @@ prevent a fatal Flymake shutdown."
(defun cmake-project--available-generators ()
(let ((help-text (shell-command-to-string "cmake --help"))
(regexp (concat
"The following generators are available on this platform:\n"
"The following generators are available on this platform.*\n"
"\\([^\\']*\\)\\'"))
(out))
(string-match regexp help-text)
(let ((gens-chunk (match-string 1 help-text)))
(while (string-match
"\\s-+\\([^=\n]+?\\)\\s-*=[^\n]+?\n\\([^\\']*\\)\\'" gens-chunk)
(setq out (add-to-list 'out (match-string 1 gens-chunk) 1))
"\\s-+\\([^=\n]+?\\)\\n?\\s-*=[^\n]+?\n\\([^\\']*\\)\\'" gens-chunk)
(if (not (string-match "\\s*" gens-chunk))
(setq out (add-to-list 'out (match-string 1 gens-chunk) 1)))
(setq gens-chunk (match-string 2 gens-chunk)))
out)))

Expand Down

0 comments on commit 77d4a5f

Please sign in to comment.