aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGeorg Müller <georgmueller@gmx.net>2017-09-14 10:18:26 +0200
committerGeorg Müller <georgmueller@gmx.net>2017-09-14 10:18:26 +0200
commit567b51ac713610fa03d444139b5c8108ba5c5c31 (patch)
tree49ebb8c36fe3a6cdfbcc94c200f4ef9600a98c8c /tools
parentc60c21a60d64b04096d0ab9968d1c59c3f264ae7 (diff)
downloadmeson-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 )
Diffstat (limited to 'tools')
-rwxr-xr-xtools/cmake2meson.py5
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)