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

Function cmLocalGeneratorCheckObjectName

Source/cmLocalGenerator.cxx:4146–4164  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4144}
4145
4146bool cmLocalGeneratorCheckObjectName(std::string& objName,
4147 std::string::size_type dir_len,
4148 std::string::size_type max_total_len)
4149{
4150 // Enforce the maximum file name length if possible.
4151 std::string::size_type max_obj_len = max_total_len;
4152 if (dir_len < max_total_len) {
4153 max_obj_len = max_total_len - dir_len;
4154 if (objName.size() > max_obj_len) {
4155 // The current object file name is too long. Try to shorten it.
4156 return cmLocalGeneratorShortenObjectName(objName, max_obj_len);
4157 }
4158 // The object file name is short enough.
4159 return true;
4160 }
4161 // The build directory in which the object will be stored is
4162 // already too deep.
4163 return false;
4164}
4165}
4166
4167std::string cmLocalGenerator::CreateSafeObjectFileName(

Callers 1

Calls 2

sizeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…