Commit c4fb13a6 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

Qbs: Make pass on cpp.defines correctly to the C++ code model

When passing -DFOO to the compiler it will treat that as similar
to "#define FOO 1". Do the same when passing FOO on to the code

Task-number: QTCREATORBUG-13384
Change-Id: I236d4731435e0559f75a3435dad9a8d935d42042
Reviewed-by: default avatarOrgad Shaneh <>
Reviewed-by: default avatarChristian Kandeler <>
parent fae50519
......@@ -727,6 +727,8 @@ void QbsProject::updateCppCodeModel()
int pos = data.indexOf('=');
if (pos >= 0)
data[pos] = ' ';
data.append(" 1"); // cpp.defines: [ "FOO" ] is considered to be "FOO=1"
grpDefines += (QByteArray("#define ") + data + '\n');
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment