_gmx_add_files_to_property(GMX_LIBGROMACS_SOURCES ${ARGN})
endfunction ()
-# TODO Reconsider this, as the CUDA driver API is probably a simpler
-# approach, at least for the build system. See Issue #2530
-function (gmx_compile_cpp_as_cuda)
- _gmx_add_files_to_property(GMX_LIBGROMACS_GPU_IMPL_SOURCES ${ARGN})
-endfunction ()
-
# Permit the configuration to disable compiling the many nbnxm kernels
# and others involved in force calculations. Currently only
# short-ranged and bonded kernels are disabled this way, but in future
*
* See documentation in nbnxm_gpu.h for details.
*
- * \todo Move into shared source file with gmx_compile_cpp_as_cuda
+ * \todo Move into shared source file, perhaps including
+ * cuda_runtime.h if needed for any remaining CUDA-specific
+ * objects.
*/
//NOLINTNEXTLINE(misc-definitions-in-headers)
bool gpu_try_finish_task(NbnxmGpu* nb,
# compiled in the way that suits GMX_GPU.
# CUDA_CU_SOURCE_FILES file1.cu file2.cu ...
# All the normal CUDA .cu source files
-# CUDA_CPP_SOURCE_FILES file1.cpp file2.cpp ...
-# All the other .cpp source files to be compiled as CUDA
# OPENCL_CPP_SOURCE_FILES file1.cpp file2.cpp ...
# All the other C++ .cpp source files needed only with OpenCL
# NON_GPU_CPP_SOURCE_FILES file1.cpp file2.cpp ...
CPP_SOURCE_FILES
CUDA_CU_SOURCE_FILES
GPU_CPP_SOURCE_FILES
- CUDA_CPP_SOURCE_FILES
OPENCL_CPP_SOURCE_FILES
NON_GPU_CPP_SOURCE_FILES
)
cuda_add_executable(${EXENAME} ${UNITTEST_TARGET_OPTIONS}
${ARG_CPP_SOURCE_FILES}
${ARG_CUDA_CU_SOURCE_FILES}
- ${ARG_CUDA_CPP_SOURCE_FILES}
${ARG_GPU_CPP_SOURCE_FILES}
${TESTUTILS_DIR}/unittest_main.cpp)
else()
if (GMX_CLANG_CUDA)
target_sources(${EXENAME} PRIVATE
${ARG_CUDA_CU_SOURCE_FILES}
- ${ARG_CUDA_CPP_SOURCE_FILES}
${ARG_GPU_CPP_SOURCE_FILES})
- set_source_files_properties(${ARG_CUDA_CPP_SOURCE_FILES} ${ARG_GPU_CPP_SOURCE_FILES} PROPERTIES CUDA_SOURCE_PROPERTY_FORMAT OBJ)
+ set_source_files_properties(${ARG_GPU_CPP_SOURCE_FILES} PROPERTIES CUDA_SOURCE_PROPERTY_FORMAT OBJ)
gmx_compile_cuda_file_with_clang(${ARG_CUDA_CU_SOURCE_FILES})
- if(ARG_CUDA_CPP_SOURCE_FILES OR ARG_CUDA_CU_SOURCE_FILES OR ARG_GPU_CPP_SOURCE_FILES)
+ if(ARG_CUDA_CU_SOURCE_FILES OR ARG_GPU_CPP_SOURCE_FILES)
target_link_libraries(${EXENAME} PRIVATE ${GMX_EXTRA_LIBRARIES})
endif()
endif()