diff options
author | Georg Müller <georgmueller@gmx.net> | 2017-09-14 10:18:26 +0200 |
---|---|---|
committer | Georg Müller <georgmueller@gmx.net> | 2017-09-14 10:18:26 +0200 |
commit | 567b51ac713610fa03d444139b5c8108ba5c5c31 (patch) | |
tree | 49ebb8c36fe3a6cdfbcc94c200f4ef9600a98c8c | |
parent | c60c21a60d64b04096d0ab9968d1c59c3f264ae7 (diff) | |
download | meson-567b51ac713610fa03d444139b5c8108ba5c5c31.zip meson-567b51ac713610fa03d444139b5c8108ba5c5c31.tar.gz meson-567b51ac713610fa03d444139b5c8108ba5c5c31.tar.bz2 |
cmake2meson: strip comments from statements
Without this change, the following correct cmake will cause an error:
statement(
arg1
# arg2
arg3
)
-rwxr-xr-x | tools/cmake2meson.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/cmake2meson.py b/tools/cmake2meson.py index 4494f4d..157a7c9 100755 --- a/tools/cmake2meson.py +++ b/tools/cmake2meson.py @@ -120,7 +120,10 @@ class Parser: args.append(self.arguments()) self.expect('rparen') arg = self.current - if self.accept('string') \ + if self.accept('comment'): + rest = self.arguments() + args += rest + elif self.accept('string') \ or self.accept('varexp') \ or self.accept('id'): args.append(arg) |