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

Method DumpInput

Source/cmFileAPICMakeFiles.cxx:89–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87}
88
89Json::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
118Json::Value CMakeFiles::DumpGlobsDependent()
119{

Callers 1

DumpInputsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected