| 256 | } |
| 257 | |
| 258 | static Result normalizeRelativePathForCompileDefine(String& path) |
| 259 | { |
| 260 | const StringView pathView = path.view(); |
| 261 | String normalized = StringEncoding::Utf8; |
| 262 | auto builder = StringBuilder::create(normalized); |
| 263 | for (size_t idx = 0; idx < pathView.sizeInBytes(); ++idx) |
| 264 | { |
| 265 | char ch = pathView.bytesWithoutTerminator()[idx]; |
| 266 | if (ch == '\\') |
| 267 | { |
| 268 | ch = '/'; |
| 269 | } |
| 270 | const char character[] = {ch, 0}; |
| 271 | SC_TRY(builder.append(StringView::fromNullTerminated(character, StringEncoding::Utf8))); |
| 272 | } |
| 273 | builder.finalize(); |
| 274 | path = move(normalized); |
| 275 | return Result(true); |
| 276 | } |
| 277 | |
| 278 | static Result addCompiledLibraryRootDefine(Project& project, const Parameters& parameters) |
| 279 | { |
no test coverage detected