[PATCH] D13407: [libcxx] Capture configuration information when installing the libc++ headers
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 6 14:14:38 PDT 2015
EricWF added inline comments.
================
Comment at: include/CMakeLists.txt:31
@@ +30,3 @@
+ # by prepending __config_site to the current __config header.
+ # TODO(EricWF) Is it portable to use "cat" and ">>"?
+ add_custom_command(OUTPUT ${LIBCXX_BINARY_DIR}/__generated_config
----------------
eugenis wrote:
> EricWF wrote:
> > eugenis wrote:
> > > I don't think >> would work on windows.
> > > Do you really need __generated_config to be created at build time (as opposed to configure time)? You could use file(read) and file(append) then.
> > >
> > I would strongly prefer the file got generated at build time so that it contains any changes made in the source tree. Any other behavior is developer hostile and non-obvious. In order to keep the installed headers consistent we need to do this. Although I hope there is a better way to achieve this.
> Right, good point. Then you could go back to the approach in D11963 where you called cmake in a custom command with a small script that used file(*) commands.
>
That approach had a problem because the cmake INSTALL command used to invoke the script doesn't take a "COMPONENT" argument which would break the "install-libcxx" rule. On windows we could do it with a call out to python or a shell script. Would that work?
http://reviews.llvm.org/D13407
More information about the cfe-commits
mailing list