1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
From: Xuanteng Huang <xuanteng.huang@outlook.com>
Date: Tue, 16 Jul 2024 13:40:40 +0800
Subject: skip missing LFS files
We exclude all the `.bz2` kdb files, but original CMakeLists.txt tries to
read the content to check whether the LFS file has been pulled.
This commit modifies the CMakeLists.txt to skip this step.
Forwarded: not-needed
---
CMakeLists.txt | 29 ++++++++++++++++-------------
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0222db3..9054e40 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -634,22 +634,25 @@ endforeach()
# Begin KDB package creation
function(install_kdb FILE_NAME COMPONENT_NAME)
- file(READ ${FILE_NAME} __contents LIMIT 7)
- get_filename_component(__fname ${FILE_NAME} NAME_WLE)
- if(__contents MATCHES "version")
- list(APPEND LFS_MISSING_FILES ${__fname})
- else()
- unpack_db(${FILE_NAME})
- if( NOT ENABLE_ASAN_PACKAGING )
- if( NOT MIOPEN_TEST_DBSYNC )
- set(__component_name COMPONENT ${COMPONENT_NAME})
+ if(EXISTS ${FILE_NAME})
+ file(READ ${FILE_NAME} __contents LIMIT 7)
+ get_filename_component(__fname ${FILE_NAME} NAME_WLE)
+ if(__contents MATCHES "version")
+ list(APPEND LFS_MISSING_FILES ${__fname})
+ else()
+ unpack_db(${FILE_NAME})
+ if( NOT ENABLE_ASAN_PACKAGING )
+ if( NOT MIOPEN_TEST_DBSYNC )
+ set(__component_name COMPONENT ${COMPONENT_NAME})
+ endif()
+ rocm_install(FILES ${KERNELS_BINARY_DIR}/${__fname}
+ DESTINATION ${DATABASE_INSTALL_DIR}
+ ${__component_name})
endif()
- rocm_install(FILES ${KERNELS_BINARY_DIR}/${__fname}
- DESTINATION ${DATABASE_INSTALL_DIR}
- ${__component_name})
endif()
+ else()
+ set(LFS_MISSING_FILES ${LFS_MISSING_FILES} PARENT_SCOPE)
endif()
- set(LFS_MISSING_FILES ${LFS_MISSING_FILES} PARENT_SCOPE)
endfunction()
# Both the lists below should be in sync always
|