From 4ea07133f513ee7daaa88c7b68b7cdf554b2c607 Mon Sep 17 00:00:00 2001 From: Maneesh Gupta Date: Fri, 23 Sep 2016 15:13:12 +0530 Subject: [PATCH] HIT: Fix logic in HIT_ADD_DIRECTORY_RECURSIVE Change-Id: I066787aaeec2a1562aa36527e60291594da31f83 [ROCm/hip commit: 40694485cabdd428f43cc4388fe55ba6f30853a6] --- projects/hip/tests/hit/HIT.cmake | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/projects/hip/tests/hit/HIT.cmake b/projects/hip/tests/hit/HIT.cmake index 0472bb4d39..847f8fdadd 100644 --- a/projects/hip/tests/hit/HIT.cmake +++ b/projects/hip/tests/hit/HIT.cmake @@ -146,8 +146,15 @@ endmacro() # Macro: HIT_ADD_DIRECTORY_RECURSIVE to scan+add all files in a directory+subdirectories for testing macro(HIT_ADD_DIRECTORY_RECURSIVE _dir) - file(GLOB_RECURSE files "${_dir}/*.c*") - hit_add_files(${_dir} ${files}) + file(GLOB children RELATIVE ${_dir} ${_dir}/*) + set(dirlist "") + foreach(child ${children}) + if(IS_DIRECTORY ${_dir}/${child}) + hit_add_directory_recursive(${_dir}/${child}) + else() + hit_add_files(${_dir} ${child}) + endif() + endforeach() endmacro() # vim: ts=4:sw=4:expandtab:smartindent