From af9e5b3f56c0c0860dd056a31b145602f236aa20 Mon Sep 17 00:00:00 2001 From: Dieter Baron Date: Thu, 2 May 2024 12:30:10 +0200 Subject: [PATCH] Use / as path separators on Windows. --- src/File.cc | 4 ++-- src/Filename.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/File.cc b/src/File.cc index d4927be..19a0190 100644 --- a/src/File.cc +++ b/src/File.cc @@ -146,7 +146,7 @@ void File::create_output() const { // NOLINT(misc-no-recursion) throw Exception("can't create output '%s'", build_filename.c_str()); } - stream << "# This file is automatically created by fast-ninja from " << source_filename.string() << std::endl; + stream << "# This file is automatically created by fast-ninja from " << source_filename.generic_string() << std::endl; stream << "# Do not edit." << std::endl << std::endl; if (!bindings.empty()) { @@ -169,7 +169,7 @@ void File::create_output() const { // NOLINT(misc-no-recursion) if (!subninjas.empty()) { stream << std::endl; for (auto& subninja : subninjas) { - stream << "subninja " << replace_extension(subninja, "ninja").string() << std::endl; + stream << "subninja " << replace_extension(subninja, "ninja").generic_string() << std::endl; } } diff --git a/src/Filename.cc b/src/Filename.cc index eea37ee..cc7e0a2 100644 --- a/src/Filename.cc +++ b/src/Filename.cc @@ -81,6 +81,6 @@ std::filesystem::path Filename::full_name() const { } std::ostream& operator<<(std::ostream& stream, const Filename& file_name) { - stream << file_name.full_name().string(); + stream << file_name.full_name().generic_string(); return stream; }