From 567b51ac713610fa03d444139b5c8108ba5c5c31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georg=20M=C3=BCller?= Date: Thu, 14 Sep 2017 10:18:26 +0200 Subject: [PATCH] cmake2meson: strip comments from statements Without this change, the following correct cmake will cause an error: statement( arg1 # arg2 arg3 ) --- tools/cmake2meson.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/cmake2meson.py b/tools/cmake2meson.py index 4494f4dbb..157a7c9a2 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)