File: set_target_properties.py

package info (click to toggle)
cmake-format 0.6.13-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,436 kB
  • sloc: python: 16,990; makefile: 14
file content (24 lines) | stat: -rw-r--r-- 611 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from cmakelang.parse.additional_nodes import TupleParser
from cmakelang.parse.argument_nodes import StandardArgTree


def parse_set_target_properties(ctx, tokens, breakstack):
  """
  ::
    set_target_properties(target1 target2 ...
                        PROPERTIES prop1 value1
                        prop2 value2 ...)
  """

  return StandardArgTree.parse(
      ctx, tokens,
      npargs='+',
      kwargs={
          "PROPERTIES": TupleParser(2, '+', [])
      },
      flags=[],
      breakstack=breakstack)


def populate_db(parse_db):
  parse_db["set_target_properties"] = parse_set_target_properties