| 361 | } |
| 362 | |
| 363 | static std::string escapeForShellOldStyle(std::string const& str) |
| 364 | { |
| 365 | std::string result; |
| 366 | #if defined(_WIN32) && !defined(__CYGWIN__) |
| 367 | // if there are spaces |
| 368 | std::string temp = str; |
| 369 | if (temp.find(" ") != std::string::npos && |
| 370 | temp.find("\"") == std::string::npos) { |
| 371 | result = cmStrCat('"', str, '"'); |
| 372 | return result; |
| 373 | } |
| 374 | return str; |
| 375 | #else |
| 376 | for (char const* ch = str.c_str(); *ch != '\0'; ++ch) { |
| 377 | if (*ch == ' ') { |
| 378 | result += '\\'; |
| 379 | } |
| 380 | result += *ch; |
| 381 | } |
| 382 | return result; |
| 383 | #endif |
| 384 | } |
| 385 | |
| 386 | void cmCustomCommandGenerator::AppendArguments(unsigned int c, |
| 387 | std::string& cmd) const |
no test coverage detected
searching dependent graphs…