summaryrefslogtreecommitdiff
path: root/task_ar.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2021-08-27 20:44:10 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2021-08-27 20:44:10 +0200
commitcd36f59cac72920d1b46036da3ddcc82f7280c96 (patch)
tree14852454b16e38f14c57d8149a8519d14ed2294a /task_ar.cc
parent7731613f50eb45e5af9cd96e05fc7e43dc3643d1 (diff)
Fix path to string conversions.
Diffstat (limited to 'task_ar.cc')
-rw-r--r--task_ar.cc14
1 files changed, 7 insertions, 7 deletions
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<std::string> 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);
}