blob: da9e10b1690e26d3d4305b9db9dfdc1b486749cd [file] [log] [blame]
diff --git a/llvm/cmake/modules/LLVMProcessSources.cmake b/llvm/cmake/modules/LLVMProcessSources.cmake
index ba8dca313c8..b99430c0f30 100644
--- a/src/llvm-project/llvm/cmake/modules/LLVMProcessSources.cmake
+++ b/src/llvm-project/llvm/cmake/modules/LLVMProcessSources.cmake
@@ -63,11 +63,15 @@ function(llvm_process_sources OUT_VAR)
llvm_check_source_file_list(${sources})
endif()
- # This adds .td and .h files to the Visual Studio solution:
- add_td_sources(sources)
- find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}")
- if (hdrs)
- set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON)
+ if( LLVM_ENABLE_IDE )
+ # This adds .td and .h files to the Visual Studio solution:
+ add_td_sources(sources)
+ find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}")
+ if (hdrs)
+ set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON)
+ endif()
+ set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
+ list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs})
endif()
set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs})