| 1659 | } |
| 1660 | |
| 1661 | bool HandlePathCommand(std::vector<std::string> const& args, |
| 1662 | std::string (*convert)(std::string const&), |
| 1663 | cmExecutionStatus& status) |
| 1664 | { |
| 1665 | if (args.size() != 3) { |
| 1666 | status.SetError("FILE([TO_CMAKE_PATH|TO_NATIVE_PATH] path result) must be " |
| 1667 | "called with exactly three arguments."); |
| 1668 | return false; |
| 1669 | } |
| 1670 | #if defined(_WIN32) && !defined(__CYGWIN__) |
| 1671 | char pathSep = ';'; |
| 1672 | #else |
| 1673 | char pathSep = ':'; |
| 1674 | #endif |
| 1675 | std::vector<std::string> path = cmSystemTools::SplitString(args[1], pathSep); |
| 1676 | |
| 1677 | std::string value = cmList::to_string(cmMakeRange(path).transform(convert)); |
| 1678 | status.GetMakefile().AddDefinition(args[2], value); |
| 1679 | return true; |
| 1680 | } |
| 1681 | |
| 1682 | bool HandleCMakePathCommand(std::vector<std::string> const& args, |
| 1683 | cmExecutionStatus& status) |
no test coverage detected
searching dependent graphs…