D5210: Proper CUDA handling

Aetf noreply at phabricator.kde.org
Thu Mar 30 00:21:23 UTC 2017


qi437103 added a comment.


  Yeah I still don't understand the overall design well. Here's my understanding, please correct me if I'm wrong
  
  - The constructor of `ParserSessionData` is the final place where arguments are assembled. It adds various include and define flags. Before this
  - `argsForSession` adds language specific flags in addition to those stored in `ParserSettings`, which is a `QString`.
  - `ParserSettings` comes from `ClangParsingEnvironment`, which is set in the constructor of `ClangParserJob`. The value is from `ClangSettingsManager::parserSettings`, which
  - Delegates the call to `DefinesAndIncludesManager::parserArguments`.
  - In `DefinesAndIncludesManager::parserArguments`, the arguments are computed by `argumentsForPath`, which basically returns corresponding string in `ParserArguments`
  - And `ParserArguments` comes from the configuration file, which can be set by user using config dialog
  
  I can add nvcc (CUDA) to the compiler provider as a `GcLickCompiler`, and do path detection there. But I'm not clear about how that information can be used in the above process. In `DefinesAndIncludesManager::parserArguments`, should I use `findConfigForItem(...).compiler->path()` to get the path to nvcc and add proper `--cuda-path` there?
  
  However the compiler is set for the whole project (at the right bottom corner of the config dialog if I understand correctly), while what we want here is actually per file type compiler.

REPOSITORY
  R32 KDevelop

REVISION DETAIL
  https://phabricator.kde.org/D5210

To: qi437103, kfunk, #kdevelop, mwolff
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20170330/afc25785/attachment.html>


More information about the KDevelop-devel mailing list