mirror of
https://github.com/reactos/CMake.git
synced 2024-11-27 05:20:34 +00:00
cuda: Extend cuda compiler detection to work with custom cuda path
This commit is contained in:
parent
55b0532128
commit
0ad180d712
@ -347,8 +347,14 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
|
||||
set(cuda_tools "CUDA ${CMAKE_VS_PLATFORM_TOOLSET_CUDA}")
|
||||
set(id_compile "CudaCompile")
|
||||
set(id_PostBuildEvent_Command [[echo CMAKE_CUDA_COMPILER=$(CudaToolkitBinDir)\nvcc.exe]])
|
||||
string(CONCAT id_Import_props [[<Import Project="$(VCTargetsPath)\BuildCustomizations\]] "${cuda_tools}" [[.props" />]])
|
||||
string(CONCAT id_Import_targets [[<Import Project="$(VCTargetsPath)\BuildCustomizations\]] "${cuda_tools}" [[.targets" />]])
|
||||
if(CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR)
|
||||
set(id_CudaToolkitCustomDir "<CudaToolkitCustomDir>${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}nvcc</CudaToolkitCustomDir>")
|
||||
string(CONCAT id_Import_props "<Import Project=\"${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}\\CUDAVisualStudioIntegration\\extras\\visual_studio_integration\\MSBuildExtensions\\${cuda_tools}.props\" />")
|
||||
string(CONCAT id_Import_targets "<Import Project=\"${CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR}\\CUDAVisualStudioIntegration\\extras\\visual_studio_integration\\MSBuildExtensions\\${cuda_tools}.targets\" />")
|
||||
else()
|
||||
string(CONCAT id_Import_props [[<Import Project="$(VCTargetsPath)\BuildCustomizations\]] "${cuda_tools}" [[.props" />]])
|
||||
string(CONCAT id_Import_targets [[<Import Project="$(VCTargetsPath)\BuildCustomizations\]] "${cuda_tools}" [[.targets" />]])
|
||||
endif()
|
||||
if(CMAKE_VS_PLATFORM_NAME STREQUAL x64)
|
||||
set(id_ItemDefinitionGroup_entry "<CudaCompile><TargetMachinePlatform>64</TargetMachinePlatform></CudaCompile>")
|
||||
endif()
|
||||
|
@ -14,6 +14,7 @@
|
||||
@id_system_version@
|
||||
@id_WindowsTargetPlatformVersion@
|
||||
@id_WindowsSDKDesktopARMSupport@
|
||||
@id_CudaToolkitCustomDir@
|
||||
</PropertyGroup>
|
||||
@id_toolset_version_props@
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
|
Loading…
Reference in New Issue
Block a user