rnk added a subscriber: rnk.

================
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
----------------
EricWF wrote:
> 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?
The >> operator should work on Windows. It's supported by cmd. However, cat 
generally isn't available. If you use 'type' in place of 'cat' it should work.


http://reviews.llvm.org/D13407



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to