summaryrefslogtreecommitdiff
path: root/task_ld.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_ld.cc
parent7731613f50eb45e5af9cd96e05fc7e43dc3643d1 (diff)
Fix path to string conversions.
Diffstat (limited to 'task_ld.cc')
-rw-r--r--task_ld.cc16
1 files changed, 8 insertions, 8 deletions
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<std::string> 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<std::string> TaskLD::depends() const
std::string TaskLD::target() const
{
- return std::string(targetFile);
+ return targetFile.string();
}
std::string TaskLD::flagsString() const