MCPcopy Create free account
hub / github.com/Kitware/CMake / AddCUDAToolkitFlags

Method AddCUDAToolkitFlags

Source/cmGeneratorTarget.cxx:2796–2816  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2794}
2795
2796void 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//----------------------------------------------------------------------------
2819std::string cmGeneratorTarget::GetFeatureSpecificLinkRuleVariable(

Callers 1

AddLanguageFlagsMethod · 0.80

Calls 2

emptyMethod · 0.45
ConvertToOutputFormatMethod · 0.45

Tested by

no test coverage detected