diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 14:58:56 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 14:58:56 +0000 |
commit | 36bf506ad3c99a309ca8bd73bd03563d8d068ac0 (patch) | |
tree | b4dc751bcee540346911aa4115729eff2f991657 /cmake/modules/LLVMProcessSources.cmake | |
parent | f9666f9b3a3d26810deae8cd54feb6e47ecee61a (diff) |
Notes
Diffstat (limited to 'cmake/modules/LLVMProcessSources.cmake')
-rw-r--r-- | cmake/modules/LLVMProcessSources.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/cmake/modules/LLVMProcessSources.cmake b/cmake/modules/LLVMProcessSources.cmake index 12a8968c724b9..b753735cd55e7 100644 --- a/cmake/modules/LLVMProcessSources.cmake +++ b/cmake/modules/LLVMProcessSources.cmake @@ -22,6 +22,7 @@ endmacro(add_header_files) function(llvm_process_sources OUT_VAR) set( sources ${ARGN} ) + llvm_check_source_file_list( ${sources} ) # Create file dependencies on the tablegenned files, if any. Seems # that this is not strictly needed, as dependencies of the .cpp # sources on the tablegenned .inc files are detected and handled, @@ -37,3 +38,17 @@ function(llvm_process_sources OUT_VAR) endif() set( ${OUT_VAR} ${sources} PARENT_SCOPE ) endfunction(llvm_process_sources) + + +function(llvm_check_source_file_list) + set(listed ${ARGN}) + file(GLOB globbed *.cpp) + foreach(g ${globbed}) + get_filename_component(fn ${g} NAME) + list(FIND listed ${fn} idx) + if( idx LESS 0 ) + message(SEND_ERROR "Found unknown source file ${g} +Please update ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt\n") + endif() + endforeach() +endfunction(llvm_check_source_file_list) |