[PATCH] D61220: lib/Header: Fix Visual Studio builds try #2
Tom Stellard via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 26 21:33:10 PDT 2019
tstellar created this revision.
tstellar added reviewers: smeenai, vzakhari, phosek.
Herald added a subscriber: mgorny.
Herald added a project: clang.
This is a follow up to r355253 and a better fix than the first attempt
which was r359257.
We can't install anything from ${CMAKE_CFG_INTDIR}, because this value
is only defined at build time, but we still must make sure to copy the
headers into ${CMAKE_CFG_INTDIR}/lib/clang/$VERSION/include, because the lit
tests look for headers there. So for this fix we revert to the
old behavior of copying the headers to ${CMAKE_CFG_INTDIR}/lib/clang/$VERSION/include
during the build and then installing them from the source tree.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D61220
Files:
clang/lib/Headers/CMakeLists.txt
Index: clang/lib/Headers/CMakeLists.txt
===================================================================
--- clang/lib/Headers/CMakeLists.txt
+++ clang/lib/Headers/CMakeLists.txt
@@ -128,6 +128,7 @@
set(output_dir ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}/include)
set(out_files)
+set(install_files)
function(copy_header_to_output_dir src_dir file)
set(src ${src_dir}/${file})
@@ -138,6 +139,8 @@
COMMENT "Copying clang's ${file}...")
list(APPEND out_files ${dst})
set(out_files ${out_files} PARENT_SCOPE)
+ list(APPEND install_files ${src})
+ set(install_files ${install_files} PARENT_SCOPE)
endfunction(copy_header_to_output_dir)
function(clang_generate_header td_option td_file out_file)
@@ -147,6 +150,7 @@
copy_header_to_output_dir(${CMAKE_CURRENT_BINARY_DIR} ${out_file})
set(out_files ${out_files} PARENT_SCOPE)
+ set(install_files ${install_files} PARENT_SCOPE)
endfunction(clang_generate_header)
@@ -169,7 +173,7 @@
set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION})
install(
- DIRECTORY ${output_dir}
+ FILES ${install_files}
DESTINATION ${header_install_dir}
COMPONENT clang-resource-headers)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61220.196947.patch
Type: text/x-patch
Size: 1194 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190427/b37295ae/attachment.bin>
More information about the cfe-commits
mailing list