summaryrefslogtreecommitdiff
path: root/task_so.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_so.cc
parent7731613f50eb45e5af9cd96e05fc7e43dc3643d1 (diff)
Fix path to string conversions.
Diffstat (limited to 'task_so.cc')
-rw-r--r--task_so.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/task_so.cc b/task_so.cc
index a60e4c3..eaf6a85 100644
--- a/task_so.cc
+++ b/task_so.cc
@@ -50,7 +50,7 @@ TaskSO::TaskSO(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)
@@ -97,7 +97,7 @@ bool TaskSO::dirtyInner()
}
{
- auto lastFlags = readFile(flagsFile);
+ auto lastFlags = readFile(flagsFile.string());
if(flagsString() != lastFlags)
{
//std::cout << "The compiler flags changed\n";
@@ -117,7 +117,7 @@ int TaskSO::runInner()
{
objectlist += " ";
}
- objectlist += std::string(objectFile);
+ objectlist += objectFile.string();
}
std::vector<std::string> args;
@@ -126,11 +126,11 @@ int TaskSO::runInner()
args.push_back("-shared");
args.push_back("-o");
- 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& depFile : depFiles)
@@ -161,13 +161,13 @@ int TaskSO::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);
}
@@ -192,7 +192,7 @@ std::vector<std::string> TaskSO::depends() const
std::string TaskSO::target() const
{
- return std::string(targetFile);
+ return targetFile.string();
}
std::string TaskSO::flagsString() const