| 243 | } |
| 244 | |
| 245 | void 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 | |
| 277 | static void MoveSystemIncludesToEnd(std::vector<std::string>& includeDirs, |
| 278 | std::string const& config, |
no test coverage detected