[PATCH] D59632: [llvm] [cmake] Add additional headers only if they exist
Michał Górny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 4 07:27:59 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL357701: [llvm] [cmake] Add additional headers only if they exist (authored by mgorny, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D59632?vs=191637&id=193711#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59632/new/
https://reviews.llvm.org/D59632
Files:
llvm/trunk/cmake/modules/LLVMProcessSources.cmake
Index: llvm/trunk/cmake/modules/LLVMProcessSources.cmake
===================================================================
--- llvm/trunk/cmake/modules/LLVMProcessSources.cmake
+++ llvm/trunk/cmake/modules/LLVMProcessSources.cmake
@@ -30,7 +30,15 @@
function(add_header_files_for_glob hdrs_out glob)
file(GLOB hds ${glob})
- set(${hdrs_out} ${hds} PARENT_SCOPE)
+ set(filtered)
+ foreach(file ${hds})
+ # Explicit existence check is necessary to filter dangling symlinks
+ # out. See https://bugs.gentoo.org/674662.
+ if(EXISTS ${file})
+ list(APPEND filtered ${file})
+ endif()
+ endforeach()
+ set(${hdrs_out} ${filtered} PARENT_SCOPE)
endfunction(add_header_files_for_glob)
function(find_all_header_files hdrs_out additional_headerdirs)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D59632.193711.patch
Type: text/x-patch
Size: 775 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190404/9d9be9f4/attachment.bin>
More information about the llvm-commits
mailing list