<div dir="ltr">Sure... But my understanding is that the goal of the server was to give people an alternative to doing that. From the cmake-server docs:<div><span style="text-align:justify;color:rgb(68,68,68);font-family:sans-serif;font-size:16px"><br></span></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><span style="text-align:justify"> 3. </span>Provide a stable interface for reading the information in the CMake cache.</blockquote></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 22, 2018 at 11:48 AM, Rich Chiodo <span dir="ltr"><<a href="mailto:rchiodo@microsoft.com" target="_blank">rchiodo@microsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_9000887597674125304WordSection1">
<p class="MsoNormal">If you have the build directory, can’t you just parse the CmakeCache.txt? CMAKE_HOME_DIRECTORY in the cache is the source folder. Seems easier than writing something to talk to CMake server.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><b>From:</b> cmake-developers [mailto:<a href="mailto:cmake-developers-bounces@cmake.org" target="_blank">cmake-developers-<wbr>bounces@cmake.org</a>]
<b>On Behalf Of </b>Isaiah Norton<br>
<b>Sent:</b> Monday, January 22, 2018 8:43 AM<br>
<b>To:</b> Tobias Hunger <<a href="mailto:tobias.hunger@gmail.com" target="_blank">tobias.hunger@gmail.com</a>><br>
<b>Cc:</b> CMake Developers <<a href="mailto:cmake-developers@cmake.org" target="_blank">cmake-developers@cmake.org</a>><br>
<b>Subject:</b> Re: [cmake-developers] Server handshake with only build directory<u></u><u></u></p><div><div class="h5">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">Hi Tobias,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">That makes sense when the goal is the IDE driving the configuration. But I'm not trying to use this for the IDE to drive the configuration, I only want to query the build directory in order for the IDE to learn about it. AFAIK the only
 way to change either one of these properties is to delete the build and start over, so again, they should be fully-determined in a configured directory.<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Isaiah<u></u><u></u></p>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">On Mon, Jan 22, 2018 at 11:04 AM, Tobias Hunger <<a href="mailto:tobias.hunger@gmail.com" target="_blank">tobias.hunger@gmail.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Hi Isaiah,<br>
<br>
the idea was to make sure the IDE and cmake agree on the settings<br>
being used and to make it very explicit what is going to be used.<br>
<br>
Best Regards,<br>
Tobias<u></u><u></u></p>
<div>
<div>
<p class="MsoNormal"><br>
On Mon, Jan 22, 2018 at 4:54 PM, Isaiah Norton <<a href="mailto:isaiah.norton@gmail.com" target="_blank">isaiah.norton@gmail.com</a>> wrote:<br>
> I'd like to use cmake server with only a build directory argument (mostly in<br>
> order to query the cache), but receive an error in return:<br>
><br>
> ```<br>
>> cmake --version<br>
> cmake version 3.9.4<br>
><br>
>> cmake -E server --experimental --debug<br>
><br>
>> [== "CMake Server" ==[<br>
>> {"cookie":"zimtstern","type":"<wbr>handshake","protocolVersion":{<wbr>"major":1},<br>
>> "buildDirectory":"/opt/bld/<wbr>s5nj/Slicer-build"<br>
>> }<br>
>> ]== "CMake Server" ==]<br>
><br>
> [== "CMake Server" ==[<br>
> {"cookie":"zimtstern","<wbr>errorMessage":"Failed to activate protocol version:<br>
> \"CMAKE_HOME_DIRECTORY\" is set but incompatible with configured source<br>
> directory value.","inReplyTo":"<wbr>handshake","type":"error"}<br>
> ]== "CMake Server" ==]<br>
> ```<br>
><br>
> The docs example with source and generator arguments works -- but shouldn't<br>
> the build directory fully determine these options for an already-configured<br>
> build tree?<br>
><br>
> Thanks,<br>
> Isaiah<br>
><br>
><u></u><u></u></p>
</div>
</div>
<p class="MsoNormal">> --<br>
><br>
> Powered by <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com&data=02%7C01%7Crchiodo%40microsoft.com%7C065a963c9f6a4bda10be08d561b737ae%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636522361946918831&sdata=%2BZ4G2s%2BKo7dDX4pvIkcrs6R9bYvdanN%2BshQEeEwKIKk%3D&reserved=0" target="_blank">
www.kitware.com</a><br>
><br>
> Please keep messages on-topic and check the CMake FAQ at:<br>
> <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.cmake.org%2FWiki%2FCMake_FAQ&data=02%7C01%7Crchiodo%40microsoft.com%7C065a963c9f6a4bda10be08d561b737ae%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636522361946918831&sdata=fI93RUK5beGFNRsOTGoEBNeqffDhsXMDG5WEgNrSRZ8%3D&reserved=0" target="_blank">
http://www.cmake.org/Wiki/<wbr>CMake_FAQ</a><br>
><br>
> Kitware offers various services to support the CMake community. For more<br>
> information on each offering, please visit:<br>
><br>
> CMake Support: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fsupport.html&data=02%7C01%7Crchiodo%40microsoft.com%7C065a963c9f6a4bda10be08d561b737ae%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636522361946918831&sdata=ZC3YV3JVFBOy83adKntYDI1tisG6H7tVs%2FAQZdLTx%2Fc%3D&reserved=0" target="_blank">
http://cmake.org/cmake/help/<wbr>support.html</a><br>
> CMake Consulting: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Fconsulting.html&data=02%7C01%7Crchiodo%40microsoft.com%7C065a963c9f6a4bda10be08d561b737ae%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636522361946918831&sdata=tjm1my%2FrsVSHMy95Iejv4aaaRUfGDKDxdZU2drPP7Qw%3D&reserved=0" target="_blank">
http://cmake.org/cmake/help/<wbr>consulting.html</a><br>
> CMake Training Courses: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fcmake.org%2Fcmake%2Fhelp%2Ftraining.html&data=02%7C01%7Crchiodo%40microsoft.com%7C065a963c9f6a4bda10be08d561b737ae%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636522361946928839&sdata=67CBSUERL3asclS90yWAqWBvn%2B5Xpg001gm9c6r%2Fyxg%3D&reserved=0" target="_blank">
http://cmake.org/cmake/help/<wbr>training.html</a><br>
><br>
> Visit other Kitware open-source projects at<br>
> <a href="https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.kitware.com%2Fopensource%2Fopensource.html&data=02%7C01%7Crchiodo%40microsoft.com%7C065a963c9f6a4bda10be08d561b737ae%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636522361946928839&sdata=XIiUOht%2Fk44D6bE2zbvSerFohiexJeF99Iyd4rmMiTI%3D&reserved=0" target="_blank">
http://www.kitware.com/<wbr>opensource/opensource.html</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcmake.org%2Fmailman%2Flistinfo%2Fcmake-developers&data=02%7C01%7Crchiodo%40microsoft.com%7C065a963c9f6a4bda10be08d561b737ae%7Cee3303d7fb734b0c8589bcd847f1c277%7C1%7C0%7C636522361946928839&sdata=hiXWNAwK6coSU0bS%2F1G5U7JXXmzNayysY9lxQTGmmmA%3D&reserved=0" target="_blank">
https://cmake.org/mailman/<wbr>listinfo/cmake-developers</a><br>
><u></u><u></u></p>
</blockquote>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div></div></div>
</div>

</blockquote></div><br></div>