From cd36f59cac72920d1b46036da3ddcc82f7280c96 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 27 Aug 2021 20:44:10 +0200 Subject: Fix path to string conversions. --- task_ld.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'task_ld.cc') diff --git a/task_ld.cc b/task_ld.cc index cd1dea3..91f3316 100644 --- a/task_ld.cc +++ b/task_ld.cc @@ -52,7 +52,7 @@ TaskLD::TaskLD(const BuildConfiguration& config, { std::filesystem::path objectFile = object; objectFiles.push_back(objectFile); - dependsStr.push_back(objectFile); + dependsStr.push_back(objectFile.string()); } for(const auto& dep : config.depends) @@ -99,7 +99,7 @@ bool TaskLD::dirtyInner() } { - auto lastFlags = readFile(flagsFile); + auto lastFlags = readFile(flagsFile.string()); if(flagsString() != lastFlags) { //std::cout << "The compiler flags changed\n"; @@ -119,13 +119,13 @@ int TaskLD::runInner() { objectlist += " "; } - objectlist += std::string(objectFile); + objectlist += objectFile.string(); } std::vector args; for(const auto& objectFile : objectFiles) { - args.push_back(std::string(objectFile)); + args.push_back(objectFile.string()); } for(const auto& depFile : depFiles) @@ -147,7 +147,7 @@ int TaskLD::runInner() args.push_back(flag); } args.push_back("-o"); - args.push_back(std::string(targetFile)); + args.push_back(targetFile.string()); { // Write flags to file. std::ofstream flagsStream(flagsFile); @@ -167,13 +167,13 @@ int TaskLD::clean() { if(std::filesystem::exists(targetFile)) { - std::cout << "Removing " << std::string(targetFile) << "\n"; + std::cout << "Removing " << targetFile.string() << "\n"; std::filesystem::remove(targetFile); } if(std::filesystem::exists(flagsFile)) { - std::cout << "Removing " << std::string(flagsFile) << "\n"; + std::cout << "Removing " << flagsFile.string() << "\n"; std::filesystem::remove(flagsFile); } @@ -198,7 +198,7 @@ std::vector TaskLD::depends() const std::string TaskLD::target() const { - return std::string(targetFile); + return targetFile.string(); } std::string TaskLD::flagsString() const -- cgit v1.2.3