<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>From:</b> cmake-developers [mailto:cmake-developers-bounces@cmake.org]
<b>On Behalf Of </b>Isaiah Norton<br>
<b>Sent:</b> Monday, January 22, 2018 8:43 AM<br>
<b>To:</b> Tobias Hunger <tobias.hunger@gmail.com><br>
<b>Cc:</b> CMake Developers <cmake-developers@cmake.org><br>
<b>Subject:</b> Re: [cmake-developers] Server handshake with only build directory<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Hi Tobias,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">Isaiah<o:p></o:p></p>
</div>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></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:<o:p></o:p></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<o:p></o:p></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">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":"handshake","protocolVersion":{"major":1},<br>
>> "buildDirectory":"/opt/bld/s5nj/Slicer-build"<br>
>> }<br>
>> ]== "CMake Server" ==]<br>
><br>
> [== "CMake Server" ==[<br>
> {"cookie":"zimtstern","errorMessage":"Failed to activate protocol version:<br>
> \"CMAKE_HOME_DIRECTORY\" is set but incompatible with configured source<br>
> directory value.","inReplyTo":"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>
><o:p></o:p></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/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/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/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/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/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/listinfo/cmake-developers</a><br>
><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>