| 2794 | } |
| 2795 | |
| 2796 | void cmGeneratorTarget::AddCUDAToolkitFlags(std::string& flags) const |
| 2797 | { |
| 2798 | std::string const& compiler = |
| 2799 | this->Makefile->GetSafeDefinition("CMAKE_CUDA_COMPILER_ID"); |
| 2800 | |
| 2801 | if (compiler == "Clang") { |
| 2802 | // Pass CUDA toolkit explicitly to Clang. |
| 2803 | // Clang's searching for the system CUDA toolkit isn't very good and it's |
| 2804 | // expected the user will explicitly pass the toolkit path. |
| 2805 | // This also avoids Clang having to search for the toolkit on every |
| 2806 | // invocation. |
| 2807 | std::string toolkitRoot = |
| 2808 | this->Makefile->GetSafeDefinition("CMAKE_CUDA_COMPILER_LIBRARY_ROOT"); |
| 2809 | |
| 2810 | if (!toolkitRoot.empty()) { |
| 2811 | flags += " --cuda-path=" + |
| 2812 | this->LocalGenerator->ConvertToOutputFormat(toolkitRoot, |
| 2813 | cmOutputConverter::SHELL); |
| 2814 | } |
| 2815 | } |
| 2816 | } |
| 2817 | |
| 2818 | //---------------------------------------------------------------------------- |
| 2819 | std::string cmGeneratorTarget::GetFeatureSpecificLinkRuleVariable( |
no test coverage detected