summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-01-20 10:20:23 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-01-20 10:20:23 +0000
commit6acf320a99c982213809ac195a7de13267de16a0 (patch)
treeb15c6b6624ef3f85a9214d34362a91574a875819
parent10e76a4edaac716960fdbde660f35bd3e2c7f69f (diff)
downloadbcm5719-llvm-6acf320a99c982213809ac195a7de13267de16a0.tar.gz
bcm5719-llvm-6acf320a99c982213809ac195a7de13267de16a0.zip
[CMake] llvm_process_sources: Introduce a parameter, ADDITIONAL_HEADERS.
ADDITIONAL_HEADERS is intended to add header files for IDEs as hint. For example: add_llvm_library(LLVMSupport Host.cpp ADDITIONAL_HEADERS Unix/Host.inc Windows/Host.inc ) llvm-svn: 199639
-rw-r--r--llvm/cmake/modules/LLVMProcessSources.cmake6
-rw-r--r--llvm/lib/Support/CMakeLists.txt2
2 files changed, 6 insertions, 2 deletions
diff --git a/llvm/cmake/modules/LLVMProcessSources.cmake b/llvm/cmake/modules/LLVMProcessSources.cmake
index 2cef6cfc3a3..4ad97575071 100644
--- a/llvm/cmake/modules/LLVMProcessSources.cmake
+++ b/llvm/cmake/modules/LLVMProcessSources.cmake
@@ -38,7 +38,8 @@ endmacro(add_header_files)
function(llvm_process_sources OUT_VAR)
- set( sources ${ARGN} )
+ cmake_parse_arguments(ARG "" "" "ADDITIONAL_HEADERS" ${ARGN})
+ set(sources ${ARG_UNPARSED_ARGUMENTS})
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
@@ -50,9 +51,10 @@ function(llvm_process_sources OUT_VAR)
endforeach(s)
if( MSVC_IDE OR XCODE )
# This adds .td and .h files to the Visual Studio solution:
- # FIXME: Shall we handle *.def here?
add_td_sources(sources)
add_header_files(sources)
+ set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON)
+ list(APPEND sources ${ARG_ADDITIONAL_HEADERS})
endif()
# Set common compiler options:
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index dcc4b524919..a6ebb12e51a 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -89,6 +89,8 @@ add_llvm_library(LLVMSupport
TimeValue.cpp
Valgrind.cpp
Watchdog.cpp
+
+ ADDITIONAL_HEADERS
Unix/Host.inc
Unix/Memory.inc
Unix/Mutex.inc
OpenPOWER on IntegriCloud