Fix hipSYCL build with CUDA target
[alexxy/gromacs.git] / src / gromacs / CMakeLists.txt
index 464620dbe53adf2852907e85b60c5490484d46f2..bf530db08138c8ef39e526f80dcdf25c4fdd4959 100644 (file)
@@ -185,6 +185,15 @@ if (GMX_GPU_CUDA)
 else()
     add_library(libgromacs ${LIBGROMACS_SOURCES})
 endif()
+
+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()
+
 target_link_libraries(libgromacs PRIVATE $<BUILD_INTERFACE:common>)
 # As long as the libgromacs target has source files that reference headers from
 # modules that don't provide CMake targets, libgromacs needs to use `src/`
@@ -199,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.
@@ -386,6 +392,8 @@ set_target_properties(libgromacs PROPERTIES
 
 gmx_manage_lmfit()
 target_link_libraries(libgromacs PRIVATE lmfit)
+gmx_manage_muparser()
+target_link_libraries(libgromacs PRIVATE muparser)
 
 # Make sure we fix "everything" found by compilers that support that
 gmx_warn_on_everything(libgromacs)