-
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
[Build] Remove build time dependency on Python to copy header files into build include
directory.
#615
[Build] Remove build time dependency on Python to copy header files into build include
directory.
#615
Conversation
It seems like a good idea to use cmake to do the copying rather than python, but wouldn't it make sense to do it with a custom command? Otherwise it won't copy automatically when the files are modified, only when cmake generate is called. Something along the lines of
might be the way to go? Similarly, there's
to make the destination directory before copying the files. |
Filed as internal issue #USD-4736. |
@meshula it totally makes sense from a developer perspective to use the custom command to get that automation. From a build system perspective, the file copy at cmake time makes a little bit more sense. Getting that automation for developers would likely outweigh streamlining CI (but if it becomes an issue that people bring up, we could always add a flag that switches things around for more optimal builds). I'm right behind you on keeping the We should retain prepending the preprocessor directive, We can use the form This would then morph this approach into something akin to: Private.cmake
copyHeaderForBuild.cmake
There's the important error checking that's going on in the existing Python file.. we could forgo that and deal with whatever cmake errors out in its place. The way that you have captured Private.cmake
copyHeaderForBuild.cmake
That is of course if we want to keep the |
A small push with some updates to get across what we have discussed thus far. |
[Build] Remove build time dependency on Python to copy header files into build `include` directory. (Internal change: 1915192)
Removes the specific build time dependency on 'copyHeaderForBuild.py' by moving the script's logic into CMake.
This change moves the operations normally performed by the script from compile time to build configuration generation time.
Description of Change(s)
copyHeaderForBuild.py
.copyHeaderForBuild.py
into CMake.Fixes Issue(s)