Fix CTest test file generation for spaces in subdirectory names

Encode the subdirectory names properly for CMake syntax.

Closes: #16299
This commit is contained in:
Stefano Soffia 2016-09-12 23:01:50 +02:00 committed by Brad King
parent 385e6a274d
commit 1f8613e9ba
1 changed files with 1 additions and 0 deletions

View File

@ -181,6 +181,7 @@ void cmLocalGenerator::GenerateTestFiles()
// TODO: Use add_subdirectory instead?
std::string outP = i->GetDirectory().GetCurrentBinary();
outP = this->ConvertToRelativePath(outP, START_OUTPUT);
outP = cmOutputConverter::EscapeForCMake(outP);
fout << "subdirs(" << outP << ")" << std::endl;
}
}