<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"><<a href="mailto:cquammen@cs.unc.edu" target="_blank">cquammen@cs.unc.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Oops, I didn'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>
<<a href="mailto:a.neundorf-work@gmx.net">a.neundorf-work@gmx.net</a>> wrote:<br>
> On Saturday 26 January 2013, Cory Quammen wrote:<br>
>> Kent,<br>
>><br>
>> I have a CMake function that may be of interest to you (see attached file).<br>
>><br>
>> For your purposes, use it as follows:<br>
>><br>
>> GetCMakeCacheValue( "${ABC_BUILD_DIR}" ABC_SOURCE_DIR )<br>
>><br>
>> where the project against which you want to build is named "ABC".<br>
>><br>
>> The first argument must always be the build directory of a project<br>
>> configured with CMake. The second (and an arbitrary number of<br>
>> subsequent arguments) are variables whose values you want to retrieve<br>
>> from the CMakeCache.txt file.<br>
>><br>
>> Assuming everything goes well, two new variables will be defined in<br>
>> the scope in which you called GetCMakeCacheValue:<br>
>><br>
>> ABC_SOURCE_DIR<br>
>> ABC_SOURCE_DIR_TYPE<br>
>><br>
>> If there is no entry for ABC_SOURCE_DIR, then the above variables will<br>
>> take on the values<br>
>><br>
>> ABC_SOURCE_DIR-NOT_FOUND<br>
>> ABC_SOURCE_DIR_TYPE-NOT_FOUND<br>
>><br>
>> I hope this is useful to you and others. It would be great if CMake<br>
>> had similar functionality built in.<br>
><br>
> Have you tried the load_cache() command ?<br>
> According to the documentation it does that, but I haven't used it myself yet.<br>
><br>
> 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>