diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-08-27 20:44:10 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-08-27 20:44:10 +0200 |
commit | cd36f59cac72920d1b46036da3ddcc82f7280c96 (patch) | |
tree | 14852454b16e38f14c57d8149a8519d14ed2294a /task_cc.cc | |
parent | 7731613f50eb45e5af9cd96e05fc7e43dc3643d1 (diff) |
Fix path to string conversions.
Diffstat (limited to 'task_cc.cc')
-rw-r--r-- | task_cc.cc | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -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) { |