| 3982 | } |
| 3983 | |
| 3984 | bool 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 | |
| 4007 | static std::string const matchVariables[] = { |
| 4008 | "CMAKE_MATCH_0", "CMAKE_MATCH_1", "CMAKE_MATCH_2", "CMAKE_MATCH_3", |
no test coverage detected