From 7936a4b3bf94b02c92a3fc64f2750aed09d99e94 Mon Sep 17 00:00:00 2001 From: Sean Keely Date: Wed, 22 Apr 2020 18:37:46 -0500 Subject: [PATCH] Adapt to new LLVM location in repo build. This will reenable incremental PSDB builds. Change-Id: I2311c124b06b544202f7c1db31b6607f2580194e [ROCm/ROCR-Runtime commit: 675f73cda984df9e4bdf54dc78847d6a82044f36] --- .../rocr-runtime/runtime/cmake_modules/utils.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/projects/rocr-runtime/runtime/cmake_modules/utils.cmake b/projects/rocr-runtime/runtime/cmake_modules/utils.cmake index 77e4411312..415e2d757f 100644 --- a/projects/rocr-runtime/runtime/cmake_modules/utils.cmake +++ b/projects/rocr-runtime/runtime/cmake_modules/utils.cmake @@ -205,3 +205,15 @@ function ( get_version DEFAULT_VERSION_STRING ) #message("${VERSION_JOB}") endfunction() + +## Collects subdirectory names and returns them in a list +function ( listsubdirs DIRPATH SUBDIRECTORIES ) + file( GLOB CONTENTS RELATIVE ${DIRPATH} "${DIRPATH}/*" ) + set ( FOLDERS, "" ) + foreach( ITEM IN LISTS CONTENTS) + if( IS_DIRECTORY "${DIRPATH}/${ITEM}" ) + list( APPEND FOLDERS ${ITEM} ) + endif() + endforeach() + set (${SUBDIRECTORIES} ${FOLDERS} PARENT_SCOPE) +endfunction()