Last active
May 18, 2019 15:50
Revisions
-
TrinityCoder revised this gist
May 18, 2019 . No changes.There are no files selected for viewing
-
TrinityCoder revised this gist
May 18, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ commands.each do |cmd| cmd = cmd.strip.upcase help = `/usr/bin/env cmake --help-command #{cmd}` help.scan(/[a-zA-Z_]+\((.+?)\)/m) do |example| example[0].scan(/[A-Z_\d]{2,}/) do |constant| constants << constant -
TrinityCoder revised this gist
May 18, 2019 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ #!/usr/bin/env -vS ruby -wKU commands = `/usr/bin/env cmake --help-command-list`.lines commands.shift # Skip version number constants = [] -
TrinityCoder created this gist
May 11, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ #!/usr/bin/env -vS ruby -wKU commands = `/usr/local/bin/cmake --help-command-list`.lines commands.shift # Skip version number constants = [] commands.each do |cmd| cmd = cmd.strip.upcase help = `/usr/local/bin/cmake --help-command #{cmd}` help.scan(/[a-zA-Z_]+\((.+?)\)/m) do |example| example[0].scan(/[A-Z_\d]{2,}/) do |constant| constants << constant end end end constants.uniq.sort.each { |constant| puts constant }