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

Method ComputeObjectMaxPath

Source/cmLocalGenerator.cxx:245–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

243}
244
245void cmLocalGenerator::ComputeObjectMaxPath()
246{
247// Choose a maximum object file name length.
248#if defined(_WIN32) || defined(__CYGWIN__)
249 this->ObjectPathMax = 250;
250#else
251 this->ObjectPathMax = 1000;
252#endif
253 cmValue plen = this->Makefile->GetDefinition("CMAKE_OBJECT_PATH_MAX");
254 if (cmNonempty(plen)) {
255 unsigned int pmax;
256 if (sscanf(plen->c_str(), "%u", &pmax) == 1) {
257 if (pmax >= 128) {
258 this->ObjectPathMax = pmax;
259 } else {
260 std::ostringstream w;
261 w << "CMAKE_OBJECT_PATH_MAX is set to " << pmax
262 << ", which is less than the minimum of 128. "
263 "The value will be ignored.";
264 this->IssueMessage(MessageType::AUTHOR_WARNING, w.str());
265 }
266 } else {
267 std::ostringstream w;
268 w << "CMAKE_OBJECT_PATH_MAX is set to \"" << *plen
269 << "\", which fails to parse as a positive integer. "
270 "The value will be ignored.";
271 this->IssueMessage(MessageType::AUTHOR_WARNING, w.str());
272 }
273 }
274 this->ObjectMaxPathViolations.clear();
275}
276
277static void MoveSystemIncludesToEnd(std::vector<std::string>& includeDirs,
278 std::string const& config,

Callers 1

cmLocalGeneratorMethod · 0.95

Calls 6

IssueMessageMethod · 0.95
cmNonemptyFunction · 0.85
c_strMethod · 0.80
strMethod · 0.80
GetDefinitionMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected