Answering what Stephen didn't reply to yet :)<br><br><div class="gmail_quote">On Wed, Jun 13, 2012 at 11:44 AM, David Röthlisberger <span dir="ltr"><<a href="mailto:david@rothlis.net" target="_blank">david@rothlis.net</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 12 Jun 2012, at 19:04, Manuel Klimek wrote:<br>
><br>
> <a href="http://clang.llvm.org/docs/JSONCompilationDatabase.html" target="_blank">http://clang.llvm.org/docs/JSONCompilationDatabase.html</a><br>
><br>
> Feeback or patches welcome :)<br>
<br>
</div>Thanks Manuel -- that was quick!<br>
<br>
<br>
SUPPORTED SYSTEMS<br>
<br>
* Since which version of CMake?<br></blockquote><div><br></div><div>Added to the doc.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
* Give an example of how to add the option to a CMakeLists.txt, and how<br>
to specify the option on the command-line when not present in the<br>
CMakeLists.txt.<br></blockquote><div><br></div><div>As Stephen said, this is a core cmake option if the generator supports it, so I'm not sure putting more cmake docs in here would help.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
* Out of curiosity, how hard would it be to implement for other CMake<br>
targets (like Visual Studio projects) -- presumably the compilation<br>
command would be different, but everything else can be re-used?<br></blockquote><div><br></div><div>I don't know how much sense this makes before we have more windows stuff working in clang.</div><div>It most certainly is possible, and I'm happy to advise should somebody be interested in tackling it...</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
* Perhaps give a link to the specific CMake implementation for the sake<br>
of those considering adding support for other CMake targets:<br>
<a href="http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe07b055" target="_blank">http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=fe07b055</a><br>
<a href="http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5674844d" target="_blank">http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5674844d</a></blockquote><div><br></div><div>I don't think that would help that much. The CMake folks usually cc' me into discussions, which I think is much more helpful. In general, the concepts are really simple here.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
FORMAT<br>
<br>
Pick a name: "compile object" or "command object", and use it consistently:<br>
<br>
--- JSON Compilation Database Format Specification.html.orig<br>
+++ JSON Compilation Database Format Specification.html<br>
@@ -111 +111 @@<br>
-objects, where each object specifies one way a translation unit<br>
+"command objects", where each command object specifies one way a translation unit<br>
@@ -113 +113 @@<br>
-<p>Each object contains the translation unit's main file, the working<br>
+<p>Each command object contains the translation unit's main file, the working<br>
@@ -131 +131 @@<br>
-compile objects for the same file, for example if the same translation unit is<br>
+command objects for the same file, for example if the same translation unit is<br>
<br>
If you have 2 different compilation commands for the same source file, do you<br>
have:<br>
a. 2 separate "command objects", or<br>
b. a single command object with two "command" entries?<br>
<br>
With my above wording changes, the answer is unambiguously "b"; but I<br>
want to confirm that's actually what you intended. Actually with json<br>
it's probably impossible to have the same key twice so I think I've just<br>
answered my own question.<br>
<br>
<br>
MINOR FIXUPS<br>
<br>
--- JSON Compilation Database Format Specification.html.orig<br>
+++ JSON Compilation Database Format Specification.html<br>
@@ -78 +78 @@<br>
-<p>This document describes a format to specify how to replay<br>
+<p>This document describes a format for specifying how to replay<br>
@@ -82 +82 @@<br>
-<p>Tools based on the C++ AST need full information how to<br>
+<p>Tools based on the C++ Abstract Syntax Tree need full information how to<br>
@@ -102 +102 @@<br>
-<p>Currently <a href="<a href="http://cmake.org" target="_blank">http://cmake.org</a>">CMake</a> support generation of compilation<br>
+<p>Currently <a href="<a href="http://cmake.org" target="_blank">http://cmake.org</a>">CMake</a> supports generation of compilation<br>
@@ -131 +131 @@<br>
-compile objects for the same file, for example if the same translation unit is<br>
+compile objects for the same file, for example if the same source file is<br>
<br>
Justification for the 2nd change: Documentation aimed at users of clang-based<br>
tools shouldn't contain acronyms relating to compiler internals.<br>
<br>
Justification for the 4th change: If the build configuration has changed<br>
(different -D or -I command-line options) then it isn't really the same<br>
translation unit.<br></blockquote><div><br></div><div>Applied all your patches and submitted.</div><div><br></div><div>Thanks a lot for your feedback :)</div><div><br></div><div>Cheers,</div><div>/Manuel</div></div>