aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mensinger <daniel@mensinger-ka.de>2020-05-31 23:22:30 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2020-06-02 20:47:22 +0300
commita252a17e6e0314c3bd77ef8cd50ada9f53cee678 (patch)
tree5e8147c782a5782637cdc578dfded0e4c334cec6
parent9ada7e18a898118bcf177ec4d39c677acaee1606 (diff)
downloadmeson-a252a17e6e0314c3bd77ef8cd50ada9f53cee678.zip
meson-a252a17e6e0314c3bd77ef8cd50ada9f53cee678.tar.gz
meson-a252a17e6e0314c3bd77ef8cd50ada9f53cee678.tar.bz2
cmake: always split property lists (fixes #7228)
-rw-r--r--mesonbuild/cmake/interpreter.py2
-rw-r--r--mesonbuild/cmake/traceparser.py5
-rw-r--r--test cases/cmake/2 advanced/subprojects/cmMod/CMakeLists.txt2
3 files changed, 5 insertions, 4 deletions
diff --git a/mesonbuild/cmake/interpreter.py b/mesonbuild/cmake/interpreter.py
index 09b633e..a5bf545 100644
--- a/mesonbuild/cmake/interpreter.py
+++ b/mesonbuild/cmake/interpreter.py
@@ -355,7 +355,7 @@ class ConverterTarget:
if 'CONFIGURATIONS' in tgt.properties:
cfgs += [x for x in tgt.properties['CONFIGURATIONS'] if x]
cfg = cfgs[0]
-
+
is_debug = self.env.coredata.get_builtin_option('debug');
if is_debug:
if 'DEBUG' in cfgs:
diff --git a/mesonbuild/cmake/traceparser.py b/mesonbuild/cmake/traceparser.py
index f20bcc8..d94e774 100644
--- a/mesonbuild/cmake/traceparser.py
+++ b/mesonbuild/cmake/traceparser.py
@@ -64,6 +64,7 @@ class CMakeTarget:
return
for key, val in self.properties.items():
self.properties[key] = [x.strip() for x in val]
+ assert all([';' not in x for x in self.properties[key]])
class CMakeGeneratorTarget(CMakeTarget):
def __init__(self, name):
@@ -574,10 +575,10 @@ class CMakeTraceParser:
continue
if mode in ['INTERFACE', 'LINK_INTERFACE_LIBRARIES', 'PUBLIC', 'LINK_PUBLIC']:
- interface += [i]
+ interface += i.split(';')
if mode in ['PUBLIC', 'PRIVATE', 'LINK_PRIVATE']:
- private += [i]
+ private += i.split(';')
if paths:
interface = self._guess_files(interface)
diff --git a/test cases/cmake/2 advanced/subprojects/cmMod/CMakeLists.txt b/test cases/cmake/2 advanced/subprojects/cmMod/CMakeLists.txt
index 50b1049..c9b2a20 100644
--- a/test cases/cmake/2 advanced/subprojects/cmMod/CMakeLists.txt
+++ b/test cases/cmake/2 advanced/subprojects/cmMod/CMakeLists.txt
@@ -20,7 +20,7 @@ set_target_properties(cmModLib PROPERTIES VERSION 1.0.1)
add_executable(testEXE main.cpp)
target_link_libraries(cmModLib ZLIB::ZLIB)
-target_link_libraries(cmModLibStatic ZLIB::ZLIB)
+target_link_libraries(cmModLibStatic ;ZLIB::ZLIB;)
target_link_libraries(testEXE cmModLib)
target_compile_definitions(cmModLibStatic PUBLIC CMMODLIB_STATIC_DEFINE)