-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Request - switch to CMake as the only build system #3351
Description
Motivation
- Keeping up with two build systems is a hassle and is prone to errors and discrepancies.
- Potential contributors may be scared off by having to figure out how to make their code build with both systems.
- Switching to a single build system would let us cut the number of TravisCI builds in half.
Questions
- What else needs to be done before the CMake build can be considered "full featured"?
- What would the implications be of deleting the manual Makefile build system? Who would be unhappy?
- If the community pitched in to address issues from (1) and (2), would the Caffe devs be willing to commit to CMake and delete the manual Makefile build system entirely?
Background
@Nerei contributed a major CMake upgrade in #1667, but it was decided to keep the old manual Makefile build around.
The official Makefile and Makefile.config build are complemented by an automatic CMake build from the community.
https://github.com/BVLC/caffe/blob/603cbfb977/docs/installation.md
Several community members have requested that we move to a single build system (especially the ever vocal @bhack):
As I stated some month ago when cmake was introduced in caffe it is better to support only one build system to avoid divergence between make tools and cmake and to not duplicate community and core members efforts to maintain two build systems.
@bhack #1738 (comment)Or probably remove Makefile. Two build system are quite impossible to be maintained in sync. Also Travis builds are not aligned between Make and Cmake.
@bhack #2651 (comment)I believe that Makefile should die from a point, nobody will update it. CMake should overtake as primary build configurator / manager. By the way CMake in contrast with autoconf/automake and Make saga enable us to be cross-platform too.
@cbalint13 #3311 (comment)
Here are some comments from the Caffe devs about Make vs. CMake:
The core developers are responsible for the Makefile build, but the CMake build is currently developed by the community until it is full featured so please do improve it.
@shelhamer #1586 (comment)I have no more time to play with build systems, I'm going back to Makefile. I'd love to have a single, beautiful, clean and readable, automagic build that works for everybody, but this is exactly what I feared: the build goes wrong, and then I have to dig. My impression is that this is a big improvement over the previous CMake build, and we should probably merge it, though I'll leave that up to others, but I can't yet support making this the one true build.
@longjon #1667 (comment)As an improvement to the current CMake build this is a step forward, but still short of an official build. This should likely be merged for those it does help, but at the same time there are many who can't have their work hampered by a byzantine build, so the official Makefile is still needed in that role.
@shelhamer #1667 (comment)