summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorStuart Golodetz <sgolodetz@gxstudios.net>2018-11-13 09:38:55 -0800
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>2018-11-13 09:41:44 -0800
commitf6e4fc071a63b8ffe89bbea892e97c598f008120 (patch)
tree3b15854540f727768a2c0102fea907eb84f1d4f7 /cmake
parentf112aa746a3200fb12737ee6cc96ac6c2b5ec725 (diff)
downloadpytorch-f6e4fc071a63b8ffe89bbea892e97c598f008120.tar.gz
pytorch-f6e4fc071a63b8ffe89bbea892e97c598f008120.tar.bz2
pytorch-f6e4fc071a63b8ffe89bbea892e97c598f008120.zip
Fix a bug that causes nvcc to emit an unknown option error (#13904)
Summary: Using `"-Xcompiler -fPIC"` causes nvcc to emit the following: nvcc fatal : Unknown option 'Xcompiler -fPIC' As per fixes lower down in the file (see also issue #7126 on GitHub), the fix is to replace it with `"-Xcompiler" "-fPIC"`. This one was apparently missed when the original fix was applied. Pull Request resolved: https://github.com/pytorch/pytorch/pull/13904 Differential Revision: D13043189 Pulled By: soumith fbshipit-source-id: 6dc6d325671e4d08cd8e6242ffc93b3bd1f65351
Diffstat (limited to 'cmake')
-rw-r--r--cmake/public/cuda.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/public/cuda.cmake b/cmake/public/cuda.cmake
index 6552435d80..efc61b4074 100644
--- a/cmake/public/cuda.cmake
+++ b/cmake/public/cuda.cmake
@@ -342,7 +342,7 @@ endforeach()
set(CUDA_PROPAGATE_HOST_FLAGS_BLACKLIST "-Werror")
if (NOT MSVC)
list(APPEND CUDA_NVCC_FLAGS "-std=c++11")
- list(APPEND CUDA_NVCC_FLAGS "-Xcompiler -fPIC")
+ list(APPEND CUDA_NVCC_FLAGS "-Xcompiler" "-fPIC")
endif()
# Debug and Release symbol support