@@ -401,33 +401,31 @@ if (USE_ACCEL MATCHES "opencl")
401401 endif ()
402402
403403 if (LIBXSTREAM_FOUND)
404- set (_dbcsr_libxstream_prefix_hints)
405- if (DBCSR_LIBXSTREAM_PREFIX)
406- list (APPEND _dbcsr_libxstream_prefix_hints
407- "${DBCSR_LIBXSTREAM_PREFIX} " )
408- endif ()
409- foreach (_dbcsr_libxstream_include_dir IN LISTS LIBXSTREAM_INCLUDE_DIRS)
410- get_filename_component (
411- _dbcsr_libxstream_prefix "${_dbcsr_libxstream_include_dir} /.."
412- ABSOLUTE )
413- list (APPEND _dbcsr_libxstream_prefix_hints
414- "${_dbcsr_libxstream_prefix} " )
415- endforeach ()
416-
417- find_program (
418- LIBXSTREAM_OPENCL_SCRIPT
419- NAMES tool_opencl.sh
420- HINTS ${_dbcsr_libxstream_prefix_hints}
421- PATH_SUFFIXES scripts bin )
422- find_path (
423- LIBXSTREAM_SMM_DIR
424- NAMES smm_acc.c
425- HINTS ${_dbcsr_libxstream_prefix_hints}
426- PATH_SUFFIXES samples/smm share/libxstream/samples/smm )
404+ set (_dbcsr_libxstream_prefix_hints)
405+ if (DBCSR_LIBXSTREAM_PREFIX)
406+ list (APPEND _dbcsr_libxstream_prefix_hints "${DBCSR_LIBXSTREAM_PREFIX} " )
407+ endif ()
408+ foreach (_dbcsr_libxstream_include_dir IN LISTS LIBXSTREAM_INCLUDE_DIRS)
409+ get_filename_component (_dbcsr_libxstream_prefix
410+ "${_dbcsr_libxstream_include_dir} /.." ABSOLUTE )
411+ list (APPEND _dbcsr_libxstream_prefix_hints "${_dbcsr_libxstream_prefix} " )
412+ endforeach ()
413+
414+ find_program (
415+ LIBXSTREAM_OPENCL_SCRIPT
416+ NAMES tool_opencl.sh
417+ HINTS ${_dbcsr_libxstream_prefix_hints}
418+ PATH_SUFFIXES scripts bin )
419+ find_path (
420+ LIBXSTREAM_SMM_DIR
421+ NAMES smm_acc.c
422+ HINTS ${_dbcsr_libxstream_prefix_hints}
423+ PATH_SUFFIXES samples/smm share/libxstream/samples/smm )
427424 if (NOT LIBXSTREAM_OPENCL_SCRIPT OR NOT LIBXSTREAM_SMM_DIR)
428425 message (
429426 STATUS
430- "Prebuilt LIBXSTREAM was found, but its OpenCL helper script or SMM samples were not found -- downloading via FetchContent" )
427+ "Prebuilt LIBXSTREAM was found, but its OpenCL helper script or SMM samples were not found -- downloading via FetchContent"
428+ )
431429 set (LIBXSTREAM_FOUND FALSE )
432430 elseif (NOT TARGET DBCSR::LIBXSTREAM)
433431 add_library (DBCSR::LIBXSTREAM INTERFACE IMPORTED GLOBAL )
0 commit comments