summaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2019-04-08 14:00:59 +0200
committerTobias Hunger <tobias.hunger@qt.io>2019-04-09 07:28:44 +0000
commit8c28c8546555c135b642f2a845c26815b085a427 (patch)
treec3d56ce1897e47ea8bd11cded162382f49756a10 /util
parent9d83b54015cd089fe8b59c660ca8dfa9e5ab84fb (diff)
CMake: pro2cmake.py: Strip '-D' from compile options
Change-Id: I8239d36dc6af1b5eeded7f293dd6c151c10e289f Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'util')
-rwxr-xr-xutil/cmake/pro2cmake.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py
index 9f40194d0a..1cb3691f14 100755
--- a/util/cmake/pro2cmake.py
+++ b/util/cmake/pro2cmake.py
@@ -982,6 +982,8 @@ def write_sources_section(cm_fh: typing.IO[str], scope: Scope, *,
if compile_options:
cm_fh.write('{} COMPILE_OPTIONS\n'.format(ind))
for co in compile_options:
+ if co.startswith('-D'):
+ co = co[2:]
cm_fh.write('{} "{}"\n'.format(ind, co))
link_options = scope.get('QMAKE_LFLAGS')