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_ar.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'task_ar.cc') diff --git a/task_ar.cc b/task_ar.cc index bcaa010..5568629 100644 --- a/task_ar.cc +++ b/task_ar.cc @@ -51,7 +51,7 @@ TaskAR::TaskAR(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) @@ -98,7 +98,7 @@ bool TaskAR::dirtyInner() } { - auto lastFlags = readFile(flagsFile); + auto lastFlags = readFile(flagsFile.string()); if(flagsString() != lastFlags) { //std::cout << "The compiler flags changed\n"; @@ -118,15 +118,15 @@ int TaskAR::runInner() { objectlist += " "; } - objectlist += std::string(objectFile); + objectlist += objectFile.string(); } std::vector args; args.push_back("rcs"); - args.push_back(std::string(targetFile)); + args.push_back(targetFile.string()); for(const auto& objectFile : objectFiles) { - args.push_back(std::string(objectFile)); + args.push_back(objectFile.string()); } for(const auto& flag : config.ldflags) { @@ -161,13 +161,13 @@ int TaskAR::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); } -- cgit v1.2.3