-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UsdCat: Initial conversion to C++ #2090
Conversation
2a91087
to
1ab2c62
Compare
Filed as internal issue #USD-7775 |
Hey @dgovil - this is awesome! We have some higher-level feedback that we wanted to give you ASAP (just gathered today). I'll make a separate post for each topic to facilitate discussion. |
On CLI11:
|
We haven't dug in deeply enough yet to understand the need for common.h, but again, no includable files in |
More broadly on shareability, our preference would be to start out with these things as all being simply executables. If you have a really compelling use-case for having the functionality be shareable/linkable, we can discuss adding to usdUtils, and having binaries be thin arg-parsers that call into usdUtils - but again, our preference would be to keep it simple for now. |
We understand there's didactic value in the python code, and we will take a task of creating a tutorial that shows how to "do the stuff that usdcat does"... |
But that said, we think that the utilities have good enough test coverage (exceptions already noted in private email, I think?) that we would rather immediately kill the python versions, thus also keeping the build simple and not needing to worry about duplicate implementations. That's it for now, thanks! |
1ab2c62
to
383aa16
Compare
383aa16
to
64a6a2a
Compare
@spiffmon thanks for the notes. I split out the addition of CLI11 to #2107 (so this PR depends on that one) With regards to the use of headers here, the reason I'd done that was certain tools like So I've removed all the headers I had, and now usdcat is just a single cpp file, plus the necessary changes to the CMakeLists. I've removed the |
Description of Change(s)
This PR is an initial conversion of the USD command line tools to C++ so that Python is not a dependency any longer.
This PR only includes
usdcat
as it had the best test coverage, and was the most common tool to run.I would like to get buyoff on the build changes in this PR before submitting follow up PRs for
usdzip
andusdtree
that I need to refactor to fit in the USD repo.Some details:
PXR_USE_PYTHON_CLI_TOOLS
argument in CMake that is also exposed to thebuild_usd.py
script to allow people to opt back to the Python utilities. The default is to build the C++ commands, but if specified this will also print a deprecation warning during the CMake generation.common.h/cpp
files in the bin folder for common functions and utilities required by the commands. We can move these to a Tf module somewhere if that's more preferable. Right now I only have the one version formatter, but other commands might add more.SOURCES
argument topxr_cpp_bin
to allow passing in other files to the target generation.Otherwise, this is a fairly standard port of
usdcat
to C++.