aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2019-07-11 16:22:16 +0200
committerDaniel Mensinger <daniel@mensinger-ka.de>2019-07-25 17:41:14 +0200
commite7948508d73e44d930daa325353aac64f0405fca (patch)
tree54c4b26d40c24ce2afdbdfdcdcc0e51a608beff1
parentab0e65c19677f47243e204054375f84e72dc61ef (diff)
downloadmeson-e7948508d73e44d930daa325353aac64f0405fca.zip
meson-e7948508d73e44d930daa325353aac64f0405fca.tar.gz
meson-e7948508d73e44d930daa325353aac64f0405fca.tar.bz2
cmake: trace: set_target_properties improved property detection
-rw-r--r--mesonbuild/cmake/traceparser.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py
index 4b87319..3b9f92b 100644
--- a/mesonbuild/cmake/traceparser.py
+++ b/mesonbuild/cmake/traceparser.py
@@ -343,8 +343,8 @@ class CMakeTraceParser:
# set_property() this is not context free. There are two approaches I
# can think of, both have drawbacks:
#
- # 1. Assume that the property will be capitalized, this is convention
- # but cmake doesn't require it.
+ # 1. Assume that the property will be capitalized ([A-Z_]), this is
+ # convention but cmake doesn't require it.
# 2. Maintain a copy of the list here: https://cmake.org/cmake/help/latest/manual/cmake-properties.7.html#target-properties
#
# Neither of these is awesome for obvious reasons. I'm going to try
@@ -354,8 +354,9 @@ class CMakeTraceParser:
arglist = [] # type: List[Tuple[str, List[str]]]
name = args.pop(0)
values = []
+ prop_regex = re.compile(r'^[A-Z_]+$')
for a in args:
- if a.isupper():
+ if prop_regex.match(a):
if values:
arglist.append((name, ' '.join(values).split(';')))
name = a