[PATCH] cmake: Remove check for files not in build list.

Matt Arsenault Matthew.Arsenault at amd.com
Thu Jul 17 23:59:12 PDT 2014


I don't see what value this provides. It does globbing for
files to build, and still requires manually listing the files.
emacs by default creates backup files in the same directory if you
make changes without saving, resulting in really irritating
build errors from the "found unknown source file .#Foo.cpp"

I also don't think it's consistently used, since this
doesn't seems to happen for some subset of directories.

http://reviews.llvm.org/D4581

Files:
  cmake/modules/LLVMProcessSources.cmake

Index: cmake/modules/LLVMProcessSources.cmake
===================================================================
--- cmake/modules/LLVMProcessSources.cmake
+++ cmake/modules/LLVMProcessSources.cmake
@@ -41,7 +41,6 @@
 function(llvm_process_sources OUT_VAR)
   cmake_parse_arguments(ARG "" "" "ADDITIONAL_HEADERS" ${ARGN})
   set(sources ${ARG_UNPARSED_ARGUMENTS})
-  llvm_check_source_file_list( ${sources} )
   if( MSVC_IDE OR XCODE )
     # This adds .td and .h files to the Visual Studio solution:
     add_td_sources(sources)
@@ -52,20 +51,3 @@
 
   set( ${OUT_VAR} ${sources} PARENT_SCOPE )
 endfunction(llvm_process_sources)
-
-
-function(llvm_check_source_file_list)
-  set(listed ${ARGN})
-  file(GLOB globbed *.c *.cpp)
-  foreach(g ${globbed})
-    get_filename_component(fn ${g} NAME)
-    list(FIND LLVM_OPTIONAL_SOURCES ${fn} idx)
-    if( idx LESS 0 )
-      list(FIND listed ${fn} idx)
-      if( idx LESS 0 )
-        message(SEND_ERROR "Found unknown source file ${g}
-Please update ${CMAKE_CURRENT_LIST_FILE}\n")
-      endif()
-    endif()
-  endforeach()
-endfunction(llvm_check_source_file_list)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4581.11635.patch
Type: text/x-patch
Size: 1118 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140718/aefe2b1f/attachment.bin>


More information about the llvm-commits mailing list