Make constraints and SETTLE tests backend-agnostic
[alexxy/gromacs.git] / src / gromacs / mdlib / tests / constr.cpp
index 2331b1f6492b698a98a0ad90f3e2e147bd7d5521..39b7227ce65fd6e649c6b8d8ed0a7aa695b57b4e 100644 (file)
@@ -530,8 +530,9 @@ public:
         // Add runners for CPU versions of SHAKE and LINCS
         runners.emplace_back(std::make_unique<ShakeConstraintsRunner>());
         runners.emplace_back(std::make_unique<LincsConstraintsRunner>());
-        // If using CUDA, add runners for the GPU version of LINCS for each available GPU
-        if (GMX_GPU_CUDA)
+        // If supported, add runners for the GPU version of LINCS for each available GPU
+        const bool addGpuRunners = GPU_CONSTRAINTS_SUPPORTED;
+        if (addGpuRunners)
         {
             for (const auto& testDevice : getTestHardwareEnvironment()->getTestDeviceList())
             {