Fix hipSYCL build with CUDA target
[alexxy/gromacs.git] / src / gromacs / CMakeLists.txt
index b3ec74b22348dc4a8a891422b76366767fa68a27..bf530db08138c8ef39e526f80dcdf25c4fdd4959 100644 (file)
@@ -186,7 +186,11 @@ else()
     add_library(libgromacs ${LIBGROMACS_SOURCES})
 endif()
 
-if (GMX_SYCL_HIPSYCL)
+if (TARGET Heffte::Heffte)
+    target_link_libraries(libgromacs PRIVATE Heffte::Heffte)
+endif()
+
+if (GMX_SYCL_HIPSYCL AND GMX_HIPSYCL_HAVE_HIP_TARGET)
     target_link_libraries(libgromacs PUBLIC roc::rocfft)
 endif()
 
@@ -204,9 +208,6 @@ target_link_libraries(libgromacs PRIVATE $<BUILD_INTERFACE:legacy_modules>)
 add_subdirectory(fileio)
 add_subdirectory(selection)
 
-# Suppress a warning about our abuse of t_inputrec
-gmx_source_file_warning_suppression(mdtypes/inputrec.cpp -Wno-class-memaccess HAS_NO_CLASS_MEMACCESS)
-
 # Handle the object libraries that contain the source file
 # dependencies that need special handling because they are generated
 # or external code.