Merge branch 'origin/release-2021' into merge-2021-into-master
[alexxy/gromacs.git] / src / gromacs / mdlib / CMakeLists.txt
index a9d37b516dd0bdf40acfef30316c870f2724c7aa..f1d575bfbe2e6fdfaad97d5215e54201e3ef4666 100644 (file)
@@ -36,6 +36,8 @@
 add_library(mdlib INTERFACE)
 
 file(GLOB MDLIB_SOURCES *.cpp)
+# To avoid listing all the necessary files manually, we will remove SYCL-specfific one here:
+list(REMOVE_ITEM MDLIB_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/leapfrog_gpu_sycl.cpp)
 
 set(MDLIB_SOURCES ${MDLIB_SOURCES} PARENT_SCOPE)
 if(GMX_GPU_CUDA)
@@ -48,6 +50,15 @@ if(GMX_GPU_CUDA)
        )
 endif()
 
+if(GMX_GPU_SYCL)
+    gmx_add_libgromacs_sources(
+        leapfrog_gpu_sycl.cpp
+    )
+    _gmx_add_files_to_property(SYCL_SOURCES
+        leapfrog_gpu_sycl.cpp
+    )
+endif()
+
 # Source files have the following private module dependencies.
 target_link_libraries(mdlib PRIVATE
 #                      gmxlib