MCPcopy Create free account
hub / github.com/Kitware/CMake / EnforceUniqueDir

Method EnforceUniqueDir

Source/cmMakefile.cxx:3984–4005  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3982}
3983
3984bool cmMakefile::EnforceUniqueDir(std::string const& srcPath,
3985 std::string const& binPath) const
3986{
3987 // Make sure the binary directory is unique.
3988 cmGlobalGenerator* gg = this->GetGlobalGenerator();
3989 if (gg->BinaryDirectoryIsNew(binPath)) {
3990 return true;
3991 }
3992 this->IssueMessage(MessageType::FATAL_ERROR,
3993 cmStrCat("The binary directory\n"
3994 " ",
3995 binPath,
3996 "\n"
3997 "is already used to build a source directory. "
3998 "It cannot be used to build source directory\n"
3999 " ",
4000 srcPath,
4001 "\n"
4002 "Specify a unique binary directory name."));
4003
4004 return false;
4005}
4006
4007static std::string const matchVariables[] = {
4008 "CMAKE_MATCH_0", "CMAKE_MATCH_1", "CMAKE_MATCH_2", "CMAKE_MATCH_3",

Callers 1

AddSubDirectoryMethod · 0.95

Calls 4

GetGlobalGeneratorMethod · 0.95
IssueMessageMethod · 0.95
BinaryDirectoryIsNewMethod · 0.80
cmStrCatFunction · 0.70

Tested by

no test coverage detected