Skip to content
This repository was archived by the owner on Jul 14, 2022. It is now read-only.

Commit 7fb185b

Browse files
Enable building shared libs with CUDA with VTKm >= 1.7
1 parent 2628a89 commit 7fb185b

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/CMakeLists.txt

-5
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ if(NOT ENABLE_SERIAL AND NOT ENABLE_MPI)
6161
"Please set ENABLE_SERIAL, ENABLE_MPI or both to ON")
6262
endif()
6363

64-
65-
if(ENABLE_CUDA AND BUILD_SHARED_LIBS)
66-
message(FATAL_ERROR "Static libraries are required when building with CUDA")
67-
endif()
68-
6964
if(ENABLE_CUDA)
7065
# ask politely a few times for SEPARABLE COMPILATION
7166
set (CMAKE_CUDA_SEPARABLE_COMPILATION ON CACHE BOOL "" )

src/cmake/thirdparty/SetupVTKm.cmake

+5
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@ if(ENABLE_CUDA AND NOT VTKm_ENABLE_CUDA)
6464
message(FATAL_ERROR "VTK-h CUDA support requires VTK-m with CUDA support (ENABLE_CUDA == TRUE, however VTKm_ENABLE_CUDA == FALSE")
6565
endif()
6666

67+
if(ENABLE_CUDA AND BUILD_SHARED_LIBS)
68+
if(VTKm_VERSION VERSION_LESS "1.7.0")
69+
message(FATAL_ERROR "Cannot build shared libs with CUDA when VTKm is < v1.7.0")
70+
endif()
71+
endif()
6772

6873
set(VTKM_FOUND TRUE)
6974

0 commit comments

Comments
 (0)