Commit cf3af44a authored by Brad King's avatar Brad King Committed by Kitware Robot
Browse files

Merge topic 'server-normalize-paths'

1c6c2bae

 cmake-server: Normalize build and source directories
Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !2898
parents 9512a582 1c6c2bae
Pipeline #129168 failed with stage
in 0 seconds
......@@ -222,13 +222,22 @@ bool cmServerProtocol1::DoActivate(const cmServerRequest& request,
std::string* errorMessage)
{
std::string sourceDirectory = request.Data[kSOURCE_DIRECTORY_KEY].asString();
const std::string buildDirectory =
request.Data[kBUILD_DIRECTORY_KEY].asString();
std::string buildDirectory = request.Data[kBUILD_DIRECTORY_KEY].asString();
std::string generator = request.Data[kGENERATOR_KEY].asString();
std::string extraGenerator = request.Data[kEXTRA_GENERATOR_KEY].asString();
std::string toolset = request.Data[kTOOLSET_KEY].asString();
std::string platform = request.Data[kPLATFORM_KEY].asString();
// normalize source and build directory
if (!sourceDirectory.empty()) {
sourceDirectory = cmSystemTools::CollapseFullPath(sourceDirectory);
cmSystemTools::ConvertToUnixSlashes(sourceDirectory);
}
if (!buildDirectory.empty()) {
buildDirectory = cmSystemTools::CollapseFullPath(buildDirectory);
cmSystemTools::ConvertToUnixSlashes(buildDirectory);
}
if (buildDirectory.empty()) {
setErrorMessage(errorMessage,
std::string("\"") + kBUILD_DIRECTORY_KEY +
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment