<div dir="ltr">What I am saying is that project("foo") should internally execute the equivalent of set(foo_SOURCE_DIR "/path/to/source") rather than set(foo "/path/to/source" CACHE STRING).  That way it would fail on every run if you referenced a project source directory variable before you had done the add_subdirectory() for that project.  Currently in that situation it fails the first time you run cmake but works as expected on subsequent runs of cmake, which I think is odd behaviour.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 1 May 2014 18:35, John Drescher <span dir="ltr"><<a href="mailto:drescherjm@gmail.com" target="_blank">drescherjm@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">> I thought they probably were.  My question was really if the behaviour that<br>
> results from that was desirable.  I can't see any reason why they should be<br>
> cached as they aren't user configurable variables.  Would it break anything<br>
> badly if they were not stored in the cache ?  It would result in more<br>
> consistent behaviour IMHO.<br>
><br>
<br>
</div>Executing<br>
<br>
cmake .<br>
<br>
would fail in the bin folder if it had no way to know where the source<br>
folder is.<br>
<span class="HOEnZb"><font color="#888888"><br>
John<br>
</font></span></blockquote></div><br></div>