summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules/LLVMProcessSources.cmake
diff options
context:
space:
mode:
authorChris Bieneman <chris.bieneman@me.com>2018-10-11 04:02:53 +0000
committerChris Bieneman <chris.bieneman@me.com>2018-10-11 04:02:53 +0000
commit3a389bd4c852dba824e18108ffc8955904069dde (patch)
treeb8d6b0052c462c65b276c4b7671f5c310bf8ef91 /llvm/cmake/modules/LLVMProcessSources.cmake
parent9a10eac663dd5a2040399a87ae96be76b087c3a6 (diff)
downloadbcm5719-llvm-3a389bd4c852dba824e18108ffc8955904069dde.tar.gz
bcm5719-llvm-3a389bd4c852dba824e18108ffc8955904069dde.zip
[CMake] Unconditionally add .h and .td files to target sources
Previously adding header and table gen files was conditional on using an IDE. Since these files have the `HEADER_FILE_ONLY` attribute applied they are ignored as sources by all non-IDE generators, so there is really no reason not to include them. Additionally having the CMake always include these files allows the CMake-server to include them in the sources list for targets, which is valuable to anyone using CMake-server integrated tools. llvm-svn: 344218
Diffstat (limited to 'llvm/cmake/modules/LLVMProcessSources.cmake')
-rw-r--r--llvm/cmake/modules/LLVMProcessSources.cmake17
1 files changed, 8 insertions, 9 deletions
diff --git a/llvm/cmake/modules/LLVMProcessSources.cmake b/llvm/cmake/modules/LLVMProcessSources.cmake
index f65f31d797c..7cbd2863500 100644
--- a/llvm/cmake/modules/LLVMProcessSources.cmake
+++ b/llvm/cmake/modules/LLVMProcessSources.cmake
@@ -52,16 +52,15 @@ function(llvm_process_sources OUT_VAR)
cmake_parse_arguments(ARG "" "" "ADDITIONAL_HEADERS;ADDITIONAL_HEADER_DIRS" ${ARGN})
set(sources ${ARG_UNPARSED_ARGUMENTS})
llvm_check_source_file_list( ${sources} )
- 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})
+
+ # 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})
set( ${OUT_VAR} ${sources} PARENT_SCOPE )
endfunction(llvm_process_sources)
OpenPOWER on IntegriCloud