<table><tr><td style="">qi437103 added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D5210" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>CUDA is compatible with both C and C++. But clang only accepts <tt style="background: #ebebeb; font-size: 13px;">c++11</tt> etc for <tt style="background: #ebebeb; font-size: 13px;">-std</tt>. For example, with <tt style="background: #ebebeb; font-size: 13px;">c11</tt>, clang says</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">error: invalid argument '-std=c11' not allowed with 'CUDA'</pre></div></div></div><br /><div><strong>INLINE COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D5210#inline-21502" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">mwolff</span> wrote in <span style="color: #4b4d51; font-weight: bold;">settingsmanager.h:45</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">why do we need three args for cuda now? why can't this be one like the other languages?</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Because I can't find a way to combine the <tt style="background: #ebebeb; font-size: 13px;">--cuda-path=/some/path</tt> flag into <tt style="background: #ebebeb; font-size: 13px;">cudaArguments</tt> and then reliably distinguish between auto detection and manually set path. Also, when using language profiles other than custom, the line edit is disabled with default arguments, so we need separate line edit for cuda path anyway.</p>
<p style="padding: 0; margin: 8px;">But I agree that this doesn't feel good. Any suggestions are welcomed.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D5210#inline-21500" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">mwolff</span> wrote in <span style="color: #4b4d51; font-weight: bold;">definesandincludesmanager.cpp:119</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">this looks fishy. at least add some comments please</p>
<p style="padding: 0; margin: 8px;">i.e. why is going two dirs up from nvcc the right cuda-path? that looks pretty arbitrary</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">Cuda is usually installed in a single folder with fixed structure, i.e. path to nvcc is <tt style="background: #ebebeb; font-size: 13px;">/path/to/cuda/bin/nvcc</tt>. That's why two cdUp. I'll add comments here.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; text-decoration: none;" href="https://phabricator.kde.org/D5210#inline-21508" rel="noreferrer">View Inline</a><span style="color: #4b4d51; font-weight: bold;">mwolff</span> wrote in <span style="color: #4b4d51; font-weight: bold;">parserwidget.ui:356</span></div>
<div style="margin: 8px 0; padding: 0 12px; color: #74777D;"><p style="padding: 0; margin: 8px;">This is the installation *path*, not the flags, no?</p></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: 8px;">It is flag. I was thinking this can give the user the ability to specify path using <tt style="background: #ebebeb; font-size: 13px;">--cuda-path=/pat/to/cuda</tt>, or <tt style="background: #ebebeb; font-size: 13px;">-nocudainc -nocudalib</tt> if they want, or completely nothing.</p>
<p style="padding: 0; margin: 8px;">But this seems to be confusing, and probably no one will want to leave this completely empty, as clang won't work at all. I'll change it to path and match the auto detection behavior:</p>
<p style="padding: 0; margin: 8px;">If auto detect failed, or user specified empty path, use <tt style="background: #ebebeb; font-size: 13px;">-nocudainc -nocudalib</tt>,<br />
otherwise use <tt style="background: #ebebeb; font-size: 13px;">--cuda-path=/path/to/cuda</tt></p></div></div></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D5210" rel="noreferrer">https://phabricator.kde.org/D5210</a></div></div><br /><div><strong>To: </strong>qi437103, kfunk, KDevelop, mwolff<br /><strong>Cc: </strong>kdevelop-devel<br /></div>