Procházet zdrojové kódy

Merge topic 'cuda-vs-17.10' into release-3.29

69f26d8156 VS: Fix compiler identification of nvcc with unsupported host compiler

Acked-by: Kitware Robot <[email protected]>
Merge-request: !9546
Brad King před 1 rokem
rodič
revize
3242f4cffc
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      Modules/CMakeDetermineCompilerId.cmake

+ 1 - 1
Modules/CMakeDetermineCompilerId.cmake

@@ -567,7 +567,7 @@ Id flags: ${testflags} ${CMAKE_${lang}_COMPILER_ID_FLAGS_ALWAYS}
       if(CMAKE_VS_PLATFORM_NAME STREQUAL x64)
         set(cuda_target "<TargetMachinePlatform>64</TargetMachinePlatform>")
       endif()
-      set(id_ItemDefinitionGroup_entry "<CudaCompile>${cuda_target}<AdditionalOptions>%(AdditionalOptions)-v</AdditionalOptions></CudaCompile>")
+      set(id_ItemDefinitionGroup_entry "<CudaCompile>${cuda_target}<AdditionalOptions>%(AdditionalOptions)-v -allow-unsupported-compiler</AdditionalOptions></CudaCompile>")
       set(id_PostBuildEvent_Command [[echo CMAKE_CUDA_COMPILER=$(CudaToolkitBinDir)\nvcc.exe]])
       if(CMAKE_VS_PLATFORM_TOOLSET_CUDA_CUSTOM_DIR)
         # check for legacy cuda custom toolkit folder structure