CMake: Fixed dependencies of .cpp source files on .td and tablegenned
[oota-llvm.git] / cmake / modules / LLVMProcessSources.cmake
1 include(AddFileDependencies)
2
3 function(llvm_process_sources)
4   set( sources ${ARGN} )
5   # Create file dependencies on the tablegenned files, if any.  Seems
6   # that this is not strictly needed, as dependencies of the .cpp
7   # sources on the tablegenned .inc files are detected and handled,
8   # but just in case...
9   foreach( s ${sources} )
10     set( f ${CMAKE_CURRENT_SOURCE_DIR}/${s} )
11     add_file_dependencies( ${f} ${TABLEGEN_OUTPUT} )
12   endforeach(s)
13 endfunction(llvm_process_sources)