<div dir="ltr">Thanks for all your help. It does seem like you can spend a long time working with CMake (nearly 10 years for me) and still learn new things!</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jan 26, 2013 at 8:48 AM, Cory Quammen <span dir="ltr">&lt;<a href="mailto:cquammen@cs.unc.edu" target="_blank">cquammen@cs.unc.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oops, I didn&#39;t know about that command. I tried it out, and it works<br>
like a charm.<br>
<br>
Thanks for pointing it out, Alex!<br>
<span class="HOEnZb"><font color="#888888"><br>
Cory<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Sat, Jan 26, 2013 at 3:25 AM, Alexander Neundorf<br>
&lt;<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>&gt; wrote:<br>
&gt; On Saturday 26 January 2013, Cory Quammen wrote:<br>
&gt;&gt; Kent,<br>
&gt;&gt;<br>
&gt;&gt; I have a CMake function that may be of interest to you (see attached file).<br>
&gt;&gt;<br>
&gt;&gt; For your purposes, use it as follows:<br>
&gt;&gt;<br>
&gt;&gt; GetCMakeCacheValue( &quot;${ABC_BUILD_DIR}&quot; ABC_SOURCE_DIR )<br>
&gt;&gt;<br>
&gt;&gt; where the project against which you want to build is named &quot;ABC&quot;.<br>
&gt;&gt;<br>
&gt;&gt; The first argument must always be the build directory of a project<br>
&gt;&gt; configured with CMake. The second (and an arbitrary number of<br>
&gt;&gt; subsequent arguments) are variables whose values you want to retrieve<br>
&gt;&gt; from the CMakeCache.txt file.<br>
&gt;&gt;<br>
&gt;&gt; Assuming everything goes well, two new variables will be defined in<br>
&gt;&gt; the scope in which you called GetCMakeCacheValue:<br>
&gt;&gt;<br>
&gt;&gt; ABC_SOURCE_DIR<br>
&gt;&gt; ABC_SOURCE_DIR_TYPE<br>
&gt;&gt;<br>
&gt;&gt; If there is no entry for ABC_SOURCE_DIR, then the above variables will<br>
&gt;&gt; take on the values<br>
&gt;&gt;<br>
&gt;&gt; ABC_SOURCE_DIR-NOT_FOUND<br>
&gt;&gt; ABC_SOURCE_DIR_TYPE-NOT_FOUND<br>
&gt;&gt;<br>
&gt;&gt; I hope this is useful to you and others. It would be great if CMake<br>
&gt;&gt; had similar functionality built in.<br>
&gt;<br>
&gt; Have you tried the load_cache() command ?<br>
&gt; According to the documentation it does that, but I haven&#39;t used it myself yet.<br>
&gt;<br>
&gt; Alex<br>
<br>
<br>
<br>
--<br>
</div></div><div class="im HOEnZb">Cory Quammen<br>
Research Associate<br>
Department of Computer Science<br>
The University of North Carolina at Chapel Hill<br>
</div><div class="HOEnZb"><div class="h5">--<br>
<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</div></div></blockquote></div><br></div>