-
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
can I separate build files and binaries from the source tree? #1859
Comments
@mwoehlke-kitware will your "unpod" build branch do this? |
it should... mostly... but not for libbot; that would need a separate change (since it is an external repo) |
A lot of thought went into the current design, but it was potentially based on We got used to working with lots of "POD collections”/super-builds, e.g. one for PODS used to come in as git submodules (and svn externals before that). We've For this reason, I’ve still favored the pods-style organization, where it’s The only problem that I see with this is that it is not the usual way. The workflow I’ve been happiest with on windows has been to generate and make |
A few issues I have with the current build system is that:
I favor, in the following order:
|
If there were some functionality that we need here that a pure CMake workflow cannot achieve, then it is may be possible we could address it in a future update to CMake. |
Thanks @jamiesnape
again, my main (only?) argument for PODs is the performance / convenience of compiling only the subproject you care about. for me, that trumps all of the above. in drake's superbuild, almost none of the subprojects ever change, except for drake. that's why they're built into "externals". in our big DRC code-base, we had subprojects and a separate externals project which was not built on make. the install instructions had you explicitly cd into externals and run make their once, and plan to never do it again (of course it was not that simple in practice). perhaps a solution like that is the most reasonable alternative? |
Your last two paragraphs are very useful. I think the best thing would be the work out the most important features that the build system for Drake needs. Whether it is PODs, CMake superbuild, or anything else is less important. |
With Kitware expertise on tap, would it be reasonable to consider a Kitware-best practices proposal for Drake builds that would meet all the goals you stated Russ, plus Jamie's and others? |
absolutely! |
To add my 2¢...
Interestingly, @bradking mentioned submodules in our internal meeting today. We may want to go back to those, but keeping them "driven" by CMake external projects.
As I'm sure you know, if A depends on B, you can't build B until you have built A. (At best, you can tell your build tool about both so it can interleave their builds with full dependency ordering, but that's not practical for us.) I think the problem here is that you are forcing a configure step every time, when it should only be necessary (at least for CMake projects) to force a build step... if the configuration is stale, the build step will re-run it. In my experience, this can be made to happen in a reasonable time when set up correctly, especially if using ninja, which does no-op builds much more quickly than
This isn't specific to PODS, though. You can do this with any CMake external project. (FWIW, though, this is one reason why I personally don't like external projects in any form. Especially working on the code of dependencies I find much easier when they aren't coupled by a superbuild.)
I think we (i.e. MIT and Kitware) must not be on the same page. As I understand it, those parts of PODS under discussion, and which are unique to PODS, deal with particular directory structures and items such as providing a "PODS Makefile" that should not have any impact on build times. As I understand, the aspects that you are pointing out and saying that you like are shared by CMake external projects (and in fact, are currently being provided through CMake external projects). I don't believe we're proposing to get rid of those. IOW, we agree that the good features are good 😄.
I think there may be some terminology confusion here. Some folk consider "out of source" to mean that neither the source nor build trees are subsets of another (e.g. my source and build directories are about six levels deep with only two levels of common prefix). The more critical issue, however (this Issue, in fact, i.e. #1859), is that PODS does not allow one to control the location of build artifacts, which makes it impossible to have multiple coexisting builds from a single source tree. |
For reference on this, some discussion about moving some of the PODS/submodules to build out of source is here: #1884 (comment) |
This is in large part done, and the remaining work is covered in #2482. |
Following the build-from-source instructions on Windows, the resulting CMake-generated files and binaries end up in the source tree (drake/build, drake/pod-build, drake/drake/pod-build at least). I would like to be able to keep the binaries separately, so I can maintain Win32 and Win64 binaries for the same source tree. Also for general source hygiene it is nice to be able to build from a read-only source tree.
Can this be done with the current build system? If not I think it would be a good modification.
The text was updated successfully, but these errors were encountered: