-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Request - switch to CMake as the only build system #3351
Comments
📣 "especially the ever vocal" |
I think we need an equivalent to CUDA_ARCH from Makefile.config. All the necessary blocks are apparently here, for instance the following works: $ cmake -DCUDA_ARCH_NAME=Kepler . |
Permit me touch release engineering water a bit more:
Hope to mention these release-engineering aspects with proper timing here. |
@flx42 ,
|
@cbalint13 Uh, yes, that's exactly what I said, but the option is hidden. |
@cbalint13 See @cdluminate work at #2601 |
IMHO if you are going to set CMake as the only build system, I wrote working packaging files for debian ( As refered in #2601, the variables I overrode are recored in the
Maybe we can change
|
Another support from me. With CMake, Caffe project can be easily imported to QtCreator to view code, edit, develop further. |
Caffe binary packaging could be also organized with Cmake Cpack Generators for Windows/Linux/OSX |
I agree with switch to CMake. It's the only one I use. Doesn't everyone want out-of-source builds? No idea what is regarded as deficient about it. I also use qtcreator and its support for CMake in order to debug efficiently. |
I also support using only one build system instead of two, and CMake offers more compatibility than the raw Makefile. But I would like to wait and hear other people's opinions before making any changes. @shelhamer @jeffdonahue @longjon what do you think of this? |
Cmake can figure out the correct dependencies for the project based on the OpenCV version (need to add |
Improvements to CMake are always welcome and it has proven popular with the community. Making it the One True Build demands a high standard.
It's not purely a matter of features, although it is necessary to be complete w.r.t. to the Makefile, but a matter of order and care. The build should be modular (not copy-paste), configurable (not hard-coded), and organized (arranged by purpose, like grouping Python options, and commented to explain). Right now there are hardcoded references to OS X 10.9, Boost 1.46, and potentially other platforms/packages/versions without explanation. The Makefile, while bespoke, is careful to check platform versions and adapt accordingly with comments for reasons as in https://github.com/BVLC/caffe/blob/master/Makefile#L269-L300. However I'll be the first to admit it is not perfect, and for instance does not handle OpenCV versions automatically and there's a lurking python2.7 reference. Of course the Makefile or CMake custom build logic can break, which is an argument for having a unified build so we can all collaborate on having the right logic. The CMake build is ~4x the code of the Make build. Granted it has more responsibilities, but this seems a bit much.
The Makefile is the official build and relied on by the core in the BVLC. Until the CMake build suffices for our dev workflow and our research and dev machines -- with Ubuntu 14.04, 15.04, 16.04 and OS X 10.{9,10,11} and CUDA 7.5 (and back to 6.0) -- the Makefile will persist.
We're happy to merge work improving the CMake build, and don't see the Makefile as an obstacle to this. Should it reach the point that it's reliable, orderly, and transparent enough to convince the core devs to switch then it sounds like it would be a candidate for the sole build. |
Motivation
Questions
Background
@Nerei contributed a major CMake upgrade in #1667, but it was decided to keep the old manual Makefile build around.
Several community members have requested that we move to a single build system (especially the ever vocal @bhack):
Here are some comments from the Caffe devs about Make vs. CMake:
The text was updated successfully, but these errors were encountered: