[PATCH] D44625: Accept any filepath in llvm_check_source_file_list
serge via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 19 13:35:58 PDT 2018
serge-sans-paille updated this revision to Diff 138997.
serge-sans-paille added a comment.
Error message updated.
https://reviews.llvm.org/D44625
Files:
cmake/modules/LLVMProcessSources.cmake
Index: cmake/modules/LLVMProcessSources.cmake
===================================================================
--- cmake/modules/LLVMProcessSources.cmake
+++ cmake/modules/LLVMProcessSources.cmake
@@ -69,10 +69,13 @@
function(llvm_check_source_file_list)
cmake_parse_arguments(ARG "" "SOURCE_DIR" "" ${ARGN})
- set(listed ${ARG_UNPARSED_ARGUMENTS})
+ foreach(l ${ARG_UNPARSED_ARGUMENTS})
+ get_filename_component(fp ${l} REALPATH)
+ list(APPEND listed ${fp})
+ endforeach()
+
if(ARG_SOURCE_DIR)
file(GLOB globbed
- RELATIVE "${CMAKE_CURRENT_LIST_DIR}"
"${ARG_SOURCE_DIR}/*.c" "${ARG_SOURCE_DIR}/*.cpp")
else()
file(GLOB globbed *.c *.cpp)
@@ -84,13 +87,14 @@
else()
set(entry "${fn}")
endif()
+ get_filename_component(gp ${g} REALPATH)
# Don't reject hidden files. Some editors create backups in the
# same directory as the file.
if (NOT "${fn}" MATCHES "^\\.")
list(FIND LLVM_OPTIONAL_SOURCES ${entry} idx)
if( idx LESS 0 )
- list(FIND listed ${entry} idx)
+ list(FIND listed ${gp} idx)
if( idx LESS 0 )
message(SEND_ERROR "Found unknown source file ${g}
Please update ${CMAKE_CURRENT_LIST_FILE}\n")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D44625.138997.patch
Type: text/x-patch
Size: 1243 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180319/834a2103/attachment.bin>
More information about the llvm-commits
mailing list