You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
gulrak/filesystem is std::filesystem-compatible (and header-only), sidestepping a lot of the pain we were getting in my other project from the API differences between boost::filesystem and std::filesystem. I'm guessing it'll save you a lot of API-divergence pain, too, as code continues to build on filesystem.
Since it's header-only, the change could be as easy as grabbing some of their headers to replace the contents of libcpr's filesystem.h.
I already hacked together something simple on the Bazel side--haven't pushed yet, but libcpr compiles cleanly if you just swap in gulrak/filesystem for boost, conditionals and all.
You guys almost certainly have comparative advantage over me with cmake, so I think I should ask if you'd do the actual integration there.
[One tricky case to think about: If you want to support the shared-library case, you'll want to make sure the same filesystem importation gets picked even if the final binary has a higher min OS version (deployment target) than was used for libcpr compilation. Not sure how cmake usually handles this...
You might want to amend their conditionals further to use experimental/filesystem if you feel like it? Happy to add it to my PR, but I don't know the history or tradeoffs as well there as you might.
Cheers!
Chris
P.S. Wish I'd steered us to this straight away when I saw someone had added the broken boost backport...sorry I just learned about it.
I really think we should backport std::filesystem with https://github.com/gulrak/filesystem instead of boost::filesystem.
gulrak/filesystem is std::filesystem-compatible (and header-only), sidestepping a lot of the pain we were getting in my other project from the API differences between boost::filesystem and std::filesystem. I'm guessing it'll save you a lot of API-divergence pain, too, as code continues to build on filesystem.
What do you think?
Some notes:
[One tricky case to think about: If you want to support the shared-library case, you'll want to make sure the same filesystem importation gets picked even if the final binary has a higher min OS version (deployment target) than was used for libcpr compilation. Not sure how cmake usually handles this...
Cheers!
Chris
P.S. Wish I'd steered us to this straight away when I saw someone had added the broken boost backport...sorry I just learned about it.
Originally posted by @cpsauer in #929 (comment)