Commit Graph

9 Commits

Author SHA1 Message Date
Daniel Pfeifer 92207752df cmServer: add braces around conditional statements 2016-09-23 22:43:36 +02:00
Tobias Hunger e22d30e25a server-mode: Allow for sending signals
Enable the server to send signals.
2016-09-22 16:30:03 +02:00
Tobias Hunger cc576c2c7f server-mode: Pass server into cmServerProtocol
The information will be needed to send signals.
2016-09-22 16:30:02 +02:00
Tobias Hunger 277ffa2881 server-mode: Move constants for server mode into its own file
This removes some duplication and makes it easier to reuse the
vocabulary.
2016-09-22 16:30:02 +02:00
Tobias Hunger 537efe0561 server-mode: Report Messages from cmake to clients
Pass messages sent from cmake via Error(...) or Message(...) on
to clients.
2016-09-20 20:52:38 +02:00
Tobias Hunger 70b8ba9a0f cmake-server: Use consistent constant naming style 2016-09-20 20:48:06 +02:00
Tobias Hunger 7df8a8f276 server-mode: Add --experimental flag
Allow for experimental cmProtocolVersions, which will only ever get
listed if the server was started with the (undocumented)
"--experimental" flag.

Mark current protocol version 1.0 as experimental.
2016-09-20 08:32:26 -04:00
Tobias Hunger d341d077c5 cmake-server: Implement ServerProtocol 1.0
Enable the initial handshake of the client to complete the connection
to the server.

The handshake sets the protocol version that client and server will
use to talk to each other. The only way to change this is to quit the
server and start over.

CMake specific information is also set during the initial handshake.
Since cmake so far never had to change basic information about any project
while running, it was decided to keep this information static and
require a restart of the cmake server to change any of these.
2016-09-19 08:57:57 -04:00
Tobias Hunger b13d3e0d0b cmake-server: Bare-bones server implementation
Adds a bare-bones cmake-server implementation and makes it possible
to start that with "cmake -E server".

Communication happens via stdin/stdout for now.

Protocol is based on Json objects surrounded by magic strings
("[== CMake Server ==[" and "]== CMake Server ==]"), which simplifies
Json parsing significantly.

This patch also defines an interface used to implement different
versions of the protocol spoken by the server, but does not include
any protocol implementaiton.
2016-09-19 08:57:57 -04:00