| 87 | } |
| 88 | |
| 89 | Json::Value CMakeFiles::DumpInput(std::string const& file) |
| 90 | { |
| 91 | Json::Value input = Json::objectValue; |
| 92 | |
| 93 | bool const isCMake = cmSystemTools::IsSubDirectory(file, this->CMakeModules); |
| 94 | if (isCMake) { |
| 95 | input["isCMake"] = true; |
| 96 | } |
| 97 | |
| 98 | if (!cmSystemTools::IsSubDirectory(file, this->TopSource) && |
| 99 | !cmSystemTools::IsSubDirectory(file, this->TopBuild)) { |
| 100 | input["isExternal"] = true; |
| 101 | } |
| 102 | |
| 103 | if (this->OutOfSource && |
| 104 | cmSystemTools::IsSubDirectory(file, this->TopBuild)) { |
| 105 | input["isGenerated"] = true; |
| 106 | } |
| 107 | |
| 108 | std::string path = file; |
| 109 | if (!isCMake && cmSystemTools::IsSubDirectory(path, this->TopSource)) { |
| 110 | // Use a relative path within the source directory. |
| 111 | path = cmSystemTools::RelativePath(this->TopSource, path); |
| 112 | } |
| 113 | input["path"] = path; |
| 114 | |
| 115 | return input; |
| 116 | } |
| 117 | |
| 118 | Json::Value CMakeFiles::DumpGlobsDependent() |
| 119 | { |