diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-15 08:57:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2019-08-15 08:57:50 +0200 |
commit | f303ec225c294c695711bead8310d3a7b23baade (patch) | |
tree | 5cfd74f6d119cc0fd65ea5ad355ca72b6bc971e9 /libbuild2/algorithm.cxx | |
parent | 043eb79a1085cf9df14f35c51428a975c84c9233 (diff) |
Implement libs_paths symlinking support on Windows
Also, temporarily enable libs_paths::link on Windows for testing.
Diffstat (limited to 'libbuild2/algorithm.cxx')
-rw-r--r-- | libbuild2/algorithm.cxx | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/libbuild2/algorithm.cxx b/libbuild2/algorithm.cxx index 75b0f5a..50db5d3 100644 --- a/libbuild2/algorithm.cxx +++ b/libbuild2/algorithm.cxx @@ -1270,15 +1270,9 @@ namespace build2 } catch (const pair<entry_type, system_error>& e) { - const char* w (nullptr); - switch (e.first) - { - case entry_type::regular: w = "copy"; break; - case entry_type::symlink: w = "symlink"; break; - case entry_type::other: w = "hardlink"; break; - default: assert (false); - } - + const char* w (e.first == entry_type::regular ? "copy" : + e.first == entry_type::symlink ? "symlink" : + e.first == entry_type::other ? "hardlink" : nullptr); print (); fail << "unable to make " << w << ' ' << l << ": " << e.second; } |