mirror of
https://github.com/PixarAnimationStudios/OpenSubdiv
synced 2024-11-23 12:10:08 +00:00
Merge pull request #869 from davidgyu/cuda_build_fix
Fixed CUDA build with newer SDKs
This commit is contained in:
commit
39c53b234a
@ -475,6 +475,22 @@ if(CUDA_FOUND)
|
||||
-DOPENSUBDIV_HAS_CUDA
|
||||
)
|
||||
set(OSD_GPU TRUE)
|
||||
|
||||
if (UNIX)
|
||||
list( APPEND CUDA_NVCC_FLAGS -Xcompiler -fPIC )
|
||||
if (NOT DEFINED OSD_CUDA_NVCC_FLAGS)
|
||||
if (CUDA_VERSION_MAJOR LESS 6)
|
||||
set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_11 )
|
||||
else()
|
||||
set( OSD_CUDA_NVCC_FLAGS --gpu-architecture compute_20 )
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (DEFINED OSD_CUDA_NVCC_FLAGS)
|
||||
list( APPEND CUDA_NVCC_FLAGS ${OSD_CUDA_NVCC_FLAGS})
|
||||
endif()
|
||||
|
||||
else()
|
||||
if (NOT NO_CUDA)
|
||||
message(WARNING
|
||||
|
@ -105,9 +105,6 @@ if (NOT NO_LIB)
|
||||
|
||||
if( CUDA_FOUND )
|
||||
include_directories( "${CUDA_INCLUDE_DIRS}" )
|
||||
if (UNIX)
|
||||
list( APPEND CUDA_NVCC_FLAGS -Xcompiler -fPIC --gpu-architecture compute_11 )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
@ -294,10 +294,6 @@ if( CUDA_FOUND )
|
||||
cudaD3D11VertexBuffer.h
|
||||
)
|
||||
endif()
|
||||
|
||||
if (UNIX)
|
||||
list( APPEND CUDA_NVCC_FLAGS -Xcompiler -fPIC --gpu-architecture compute_11 )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND DOXY_HEADER_FILES ${CUDA_PUBLIC_HEADERS})
|
||||
|
Loading…
Reference in New Issue
Block a user