summaryrefslogtreecommitdiff
path: root/task_cc.cc
diff options
context:
space:
mode:
Diffstat (limited to 'task_cc.cc')
-rw-r--r--task_cc.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/task_cc.cc b/task_cc.cc
index 366cbfe..af9cf7a 100644
--- a/task_cc.cc
+++ b/task_cc.cc
@@ -164,7 +164,7 @@ bool TaskCC::dirtyInner()
}
{
- auto lastFlags = readFile(flagsFile);
+ auto lastFlags = readFile(flagsFile.string());
if(flagsString() != lastFlags)
{
//std::cout << "The compiler flags changed\n";
@@ -172,7 +172,7 @@ bool TaskCC::dirtyInner()
}
}
- auto depList = readDeps(depsFile);
+ auto depList = readDeps(depsFile.string());
for(const auto& dep : depList)
{
if(!std::filesystem::exists(dep) ||
@@ -198,14 +198,14 @@ int TaskCC::runInner()
{
if(!std::filesystem::exists(sourceFile))
{
- std::cout << "Missing source file: " << std::string(sourceFile) << "\n";
+ std::cout << "Missing source file: " << sourceFile.string() << "\n";
return 1;
}
auto args = getCompilerArgs();
{ // Write flags to file.
- std::ofstream flagsStream(flagsFile);
+ std::ofstream flagsStream(flagsFile.string());
flagsStream << flagsString();
}
@@ -223,19 +223,19 @@ int TaskCC::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(depsFile))
{
- std::cout << "Removing " << std::string(depsFile) << "\n";
+ std::cout << "Removing " << depsFile.string() << "\n";
std::filesystem::remove(depsFile);
}
if(std::filesystem::exists(flagsFile))
{
- std::cout << "Removing " << std::string(flagsFile) << "\n";
+ std::cout << "Removing " << flagsFile.string() << "\n";
std::filesystem::remove(flagsFile);
}
@@ -249,7 +249,7 @@ std::vector<std::string> TaskCC::depends() const
std::string TaskCC::target() const
{
- return targetFile;
+ return targetFile.string();
}
std::string TaskCC::toJSON() const
@@ -309,9 +309,9 @@ std::vector<std::string> TaskCC::getCompilerArgs() const
}
args.push_back("-c");
- args.push_back(std::string(sourceFile));
+ args.push_back(sourceFile.string());
args.push_back("-o");
- args.push_back(std::string(targetFile));
+ args.push_back(targetFile.string());
for(const auto& flag : compiler_flags)
{