Interface Server
- All Known Implementing Classes:
ServerProtocolV1
public interface Server
Interface that defines a Cmake server. Server interface is based off of
https://cmake.org/cmake/help/v3.7/manual/cmake-server.7.html
-
Method Summary
Modifier and TypeMethodDescriptioncache()Lists the cached configuration values after the project is configured.Requests files used by CMake as part of the build system itself.Requests the project's code model once its configured successfully.compute()Computes, i.e., generates the build system files in the build directory.Configures our project for build.booleanconnect()Starts and connects to a Cmake server and sends a HelloRequest.voidDisconnected from the Cmake server.Returns the compiler executable used C files.Returns to the path of the Cmake executable.Returns the compiler executable used Cpp files.Cmake server returns a list of supported versions when a connection is established (via the HelloResult).Request to get the state of Cmake (after a successful handshake).handshake(HandshakeRequest handshakeRequest) One of the first request a client may send to the Cmake server.booleanReturns the connection status to the Cmake server
-
Method Details
-
connect
Starts and connects to a Cmake server and sends a HelloRequest.- Returns:
- true if connected successfully to Cmake server
- Throws:
IOException- I/O failure
-
disconnect
Disconnected from the Cmake server.- Throws:
IOException- I/O failure
-
isConnected
boolean isConnected()Returns the connection status to the Cmake server- Returns:
- true if connected Cmake server
-
getSupportedVersion
Cmake server returns a list of supported versions when a connection is established (via the HelloResult). This function returns the supported version to be sent for handshake.- Returns:
- list of protocol versions supported by the server. The list is empty if the server does not support the Cmake server.
-
handshake
One of the first request a client may send to the Cmake server.- Parameters:
handshakeRequest- - a valid handshake request- Returns:
- HandshakeResult
- Throws:
IOException- I/O failure
-
configure
Configures our project for build.- Parameters:
cacheArguments- list of strings to configure via the cache argument keys. These string are interpreted similar to cmake command line client.- Returns:
- ConfigureCommandResult - this object holds the ConfigureResult and interactive messages returned by Cmake when configuring the project.
- Throws:
IOException- I/O failure
-
compute
Computes, i.e., generates the build system files in the build directory. Ideally, this function should be called only if configure succeeds.- Returns:
- ComputeResult
- Throws:
IOException- I/O failure
-
codemodel
Requests the project's code model once its configured successfully.- Returns:
- CodeModel
- Throws:
IOException- I/O failure
-
cache
Lists the cached configuration values after the project is configured.- Returns:
- CacheResult
- Throws:
IOException- I/O failure
-
cmakeInputs
Requests files used by CMake as part of the build system itself.- Returns:
- CmakeInputsResult
- Throws:
IOException- I/O failure
-
globalSettings
Request to get the state of Cmake (after a successful handshake).- Returns:
- global settings of Cmake's state
- Throws:
IOException- I/O failure
-
getCCompilerExecutable
Returns the compiler executable used C files.- Returns:
- full path to the compiler and compiler executable. If compiler executable is not found this function returns null.
-
getCppCompilerExecutable
Returns the compiler executable used Cpp files.- Returns:
- full path to the compiler and compiler executable. If compiler executable is not found this function returns null.
-
getCmakePath
Returns to the path of the Cmake executable.
-