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.


From: cmake-developers [mailto:cmake-developers-boun...@cmake.org] On Behalf Of 
Isaiah Norton
Sent: Monday, January 22, 2018 8:43 AM
To: Tobias Hunger <tobias.hun...@gmail.com>
Cc: CMake Developers <cmake-developers@cmake.org>
Subject: Re: [cmake-developers] Server handshake with only build directory

Hi Tobias,

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.

Isaiah

On Mon, Jan 22, 2018 at 11:04 AM, Tobias Hunger 
<tobias.hun...@gmail.com<mailto:tobias.hun...@gmail.com>> wrote:
Hi Isaiah,

the idea was to make sure the IDE and cmake agree on the settings
being used and to make it very explicit what is going to be used.

Best Regards,
Tobias

On Mon, Jan 22, 2018 at 4:54 PM, Isaiah Norton 
<isaiah.nor...@gmail.com<mailto:isaiah.nor...@gmail.com>> wrote:
> I'd like to use cmake server with only a build directory argument (mostly in
> order to query the cache), but receive an error in return:
>
> ```
>> cmake --version
> cmake version 3.9.4
>
>> cmake -E server --experimental --debug
>
>> [== "CMake Server" ==[
>> {"cookie":"zimtstern","type":"handshake","protocolVersion":{"major":1},
>> "buildDirectory":"/opt/bld/s5nj/Slicer-build"
>> }
>> ]== "CMake Server" ==]
>
> [== "CMake Server" ==[
> {"cookie":"zimtstern","errorMessage":"Failed to activate protocol version:
> \"CMAKE_HOME_DIRECTORY\" is set but incompatible with configured source
> directory value.","inReplyTo":"handshake","type":"error"}
> ]== "CMake Server" ==]
> ```
>
> The docs example with source and generator arguments works -- but shouldn't
> the build directory fully determine these options for an already-configured
> build tree?
>
> Thanks,
> Isaiah
>
>
> --
>
> Powered by 
> www.kitware.com<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>
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ<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>
>
> Kitware offers various services to support the CMake community. For more
> information on each offering, please visit:
>
> CMake Support: 
> http://cmake.org/cmake/help/support.html<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>
> CMake Consulting: 
> http://cmake.org/cmake/help/consulting.html<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>
> CMake Training Courses: 
> http://cmake.org/cmake/help/training.html<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>
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html<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>
>
> Follow this link to subscribe/unsubscribe:
> https://cmake.org/mailman/listinfo/cmake-developers<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>
>

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake-developers

Reply via email to