summaryrefslogtreecommitdiffhomepage
path: root/file.cpp
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2024-05-07 19:08:29 +0200
committerRoland Reichwein <mail@reichwein.it>2024-05-07 19:08:29 +0200
commit7dabda20e11138f2235b12271d569cd3256ebf3a (patch)
treed917df1ea84609519a560a092a63683cb54b1894 /file.cpp
parent81bcfee54362c736e865ebeb638aeadfa9cc9e24 (diff)
Recursive build
Diffstat (limited to 'file.cpp')
-rw-r--r--file.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/file.cpp b/file.cpp
index 9912d29..da00dff 100644
--- a/file.cpp
+++ b/file.cpp
@@ -22,3 +22,10 @@ bool is_compile_unit_source_by_extension(const fs::path& p) {
return compile_unit_source_types.find(ext) != compile_unit_source_types.end();
}
+std::filesystem::path simplified_path(const std::filesystem::path& p)
+{
+ if (p.string().substr(0, 2) == "./") {
+ return p.string().substr(2);
+ }
+ return p;
+}