File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,30 @@ endif()
211
211
# Use C++17
212
212
target_compile_features (ipc_toolkit PUBLIC cxx_std_17)
213
213
214
+ ################################################################################
215
+ # CUDA
216
+ ################################################################################
217
+
218
+ if (IPC_TOOLKIT_WITH_CUDA)
219
+ include (CheckLanguage)
220
+ check_language(CUDA)
221
+
222
+ if (CMAKE_CUDA_COMPILER)
223
+ enable_language (CUDA)
224
+ else ()
225
+ message (FATAL_ERROR "No CUDA support found!" )
226
+ endif ()
227
+
228
+ # We need to explicitly state that we need all CUDA files in the particle
229
+ # library to be built with -dc as the member functions could be called by
230
+ # other libraries and executables.
231
+ set_target_properties (ipc_toolkit PROPERTIES CUDA_SEPARABLE_COMPILATION ON )
232
+
233
+ # Use the same CUDA architectures Scalable CCD
234
+ get_target_property (CMAKE_CUDA_ARCHITECTURES scalable_ccd CUDA_ARCHITECTURES)
235
+ set_target_properties (ipc_toolkit PROPERTIES CUDA_ARCHITECTURES "${CMAKE_CUDA_ARCHITECTURES} " )
236
+ endif ()
237
+
214
238
################################################################################
215
239
# Tests
216
240
################################################################################
You can’t perform that action at this time.
0 commit comments