Split CUDA_NVCC_FLAGS by space (#44603)

Summary:
Fixes https://github.com/pytorch/pytorch/issues/44599

Pull Request resolved: https://github.com/pytorch/pytorch/pull/44603

Reviewed By: albanD

Differential Revision: D23692320

Pulled By: ezyang

fbshipit-source-id: 6a63d94ab8b88e7a82f9d65f03523d6ef639c754
This commit is contained in:
peter 2020-09-14 20:24:07 -07:00 committed by Facebook GitHub Bot
parent 2c4b4aa81b
commit ed862d3682
3 changed files with 3 additions and 3 deletions

View File

@ -360,7 +360,7 @@ if(MSVC)
endforeach(flag_var)
# Try harder
list(APPEND CUDA_NVCC_FLAGS "-Xcompiler /w -w")
list(APPEND CUDA_NVCC_FLAGS "-Xcompiler" "/w" "-w")
endif(MSVC)
list(APPEND CUDA_NVCC_FLAGS "-Xfatbin" "-compress-all")

View File

@ -72,7 +72,7 @@ endif()
if(MSVC)
# we want to respect the standard, and we are bored of those **** .
add_definitions(-D_CRT_SECURE_NO_DEPRECATE=1)
list(APPEND CUDA_NVCC_FLAGS "-Xcompiler /wd4819 -Xcompiler /wd4503 -Xcompiler /wd4190 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4275 -Xcompiler /wd4522")
list(APPEND CUDA_NVCC_FLAGS "-Xcompiler" "/wd4819" "-Xcompiler" "/wd4503" "-Xcompiler" "/wd4190" "-Xcompiler" "/wd4244" "-Xcompiler" "/wd4251" "-Xcompiler" "/wd4275" "-Xcompiler" "/wd4522")
endif(MSVC)
if(USE_ROCM)

View File

@ -1482,7 +1482,7 @@ if(NOT INTERN_BUILD_MOBILE)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE=1)
# skip unwanted includes from windows.h
add_definitions(-DWIN32_LEAN_AND_MEAN)
list(APPEND CUDA_NVCC_FLAGS "-Xcompiler /wd4819 -Xcompiler /wd4503 -Xcompiler /wd4190 -Xcompiler /wd4244 -Xcompiler /wd4251 -Xcompiler /wd4275 -Xcompiler /wd4522")
list(APPEND CUDA_NVCC_FLAGS "-Xcompiler" "/wd4819" "-Xcompiler" "/wd4503" "-Xcompiler" "/wd4190" "-Xcompiler" "/wd4244" "-Xcompiler" "/wd4251" "-Xcompiler" "/wd4275" "-Xcompiler" "/wd4522")
endif()
if(NOT MSVC)