-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
USDSchemaGen semicolons #15
Comments
Filed as internal issue #135683. |
asluk
pushed a commit
to asluk/USD
that referenced
this issue
Aug 31, 2016
…iting out the usdGenSchema Python file. CMake was stripping out semicolons. This caused the resulting python file to have the following string: customCode = _ExtractCustomCode(clsHFilePath, default='}\n\n#endif\n') whereas the original had: customCode = _ExtractCustomCode(clsHFilePath, default='};\n\n#endif\n') This caused usdGenSchema to generate syntactically invalid C++ classes( no closing semicolon) in the case where a user had no custom code and the default string above would be used. Credit to github user murphyeoin for filing the bug and pointing us to the fix. Fixes PixarAnimationStudios#15 (Internal change: 1646239)
This was referenced Feb 9, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello.. I'm going to submit this as an issue while we get our fork workflow up between the public github repo and our own internal one and can easily branch...
Running the usdGenSchema command creates header file class definitions that do not close the class declaration with a semicolon which causes an error on compilation. The offending code is in the cmake file when reading in the usdGenSchema.py file to replace the pxrpythonsubst with the configured python executable before writing back out for install. Code is here: https://github.com/PixarAnimationStudios/USD/blob/2eb01f5cd4c2dae4e1ef9912ca27a93083bb6ef4/cmake/macros/Public.cmake#L34
Offending code is:
If we do a file read cmake operation and semicolons are found it is treated as a list, so the file write operation will remove all semicolons from the output. The fix is easy, wrap with quotes so it is treated as a string i.e.
Thanks
Eoin
The text was updated successfully, but these errors were encountered: