From: Cordell Bloor <cgmb@debian.org>
Date: Sat, 8 Nov 2025 13:55:15 -0700
Subject: fix optional hiprand

Forwarded: no
---
 clients/tests/CMakeLists.txt | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/clients/tests/CMakeLists.txt b/clients/tests/CMakeLists.txt
index db38614..10fecc9 100644
--- a/clients/tests/CMakeLists.txt
+++ b/clients/tests/CMakeLists.txt
@@ -116,7 +116,7 @@ foreach( target ${TEST_TARGETS} )
       target_compile_options( ${target} PRIVATE --offload-arch=${gpu_target} )
     endforeach()
 
-    if( NOT hiprand_FOUND )
+    if( USE_HIPRAND AND NOT hiprand_FOUND )
       find_package( hiprand REQUIRED )
     endif()
     if( USE_HIPRAND )
