aboutsummaryrefslogtreecommitdiff
path: root/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
commit6fb010f388bb2cb2f00fe039123092308ac4865d (patch)
tree627419807438525ded3dda17b0be86fbdfddbb6a /cmake
parent0801e41a5193a5c6d9794886524bbeb83f7f4150 (diff)
[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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@344218 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r--cmake/modules/LLVMProcessSources.cmake17
1 files changed, 8 insertions, 9 deletions
diff --git a/cmake/modules/LLVMProcessSources.cmake b/cmake/modules/LLVMProcessSources.cmake
index f65f31d797c..7cbd2863500 100644
--- a/cmake/modules/LLVMProcessSources.cmake
+++ b/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)