-
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
CMake build system (feature development tracking PR) #623
Conversation
Awesome, Travis successfully builds with both CMake and make. I will give this a final review soon. Thanks for all your hard work @akosiorek. |
I've added CPU-Only build in #784 |
@jeffdonahue @akosiorek Is there something else in the TODO list? |
@bhack The commit I've just pushed to my fork's cmake branch introduces a CMake
This commit also excludes building tests from the We should probably add |
The way the Makefile lint target works is to run cpp_lint.py on each source files (Makefile:322) and output to a .lint.txt file in the build dir, e.g.:
There are a couple pipes into Then, once all the per-file .lint.txt files have been created, they are concatenated into one big file (Makefile:310) I wouldn't expect a cmake version of lint to be implemented in this exact same way. |
@jeffdonahue I added |
I haven't tested this yet, but while I'm thinking about it, one definite TODO before merge into dev is to add gflags as this is a new dependency as of #776. I'll add a new item to the checklist. |
I added gflags and rebased onto BVLC/dev in #818 |
Thanks, force pushed #818. Doesn't seem to build on Travis though. |
Sorry about that, I went a little bit too fast with this one. I'll try to figure it out. |
@jeffdonahue @akosiorek Please take a look #822. |
Is there some other bullet on the todo list? Can be merged? |
Sorry again for the delay in reviewing this. I rebased this myself on the latest dev and tried to build using it myself. I did the following:
At first I got an error on After that change,
|
@jeffdonahue CMake 2.8.8 adds support for curand. That's why @bhack and me added a step to install the newest CMake on Travis-CI before building. |
Ah...well that would explain it, haha. Sorry; I unpushed that commit. It seems odd to me that support for curand had to specifically be added (just to add Anyway, I tried using (edit: I'm using Ubuntu 12.04 btw, which is what Travis's build bots use) |
@jeffdonahue have you executed |
d'oh... thanks,
|
Yes, I removed the ctest support a few commits ago and added a |
Got it. Thanks. Everything installed and all the tests passed. In the last commit I added some basic documentation of the cmake build process and a note on installation of cmake 2.8.9 in ubuntu 12.04. I still need to go through the diff before merging though, sorry. |
I'm glad that it works for you. I'm sorry for not providing any documentation myself. |
* it was set only when BUILD_EXAMPLES==OFF
* added gflags requirement in CMake * fixed a bug that linked some tests into caffe lib * renamed tools/caffe due to conflicting target names with caffe lib * rebased onto bvlc/caffe
other minor cleanup
(Required as I had to change the tool target names to '.bin' but give them an OUTPUT_NAME, but the .bin made the test_net tool collide with the test_net unit test.)
After going through the diff, I did some minor cleanup and moved Thanks for all your great work on this @akosiorek! Well done. The documentation I added is pretty thin -- if you wanted to add a few more details in a later PR (e.g., of the |
CMake build system (feature development tracking PR)
Tanks to all. We will maintain two build systems or we will remove Makefile from dev branch? |
Thanks guys! |
Great job, congratulations! |
CMake build system (feature development tracking PR)
CMake build system (feature development tracking PR)
This PR will officially track the development of the CMake build system for Caffe until it's ready to be merged into dev. I've taken #573 from @akosiorek (currently rebased on the latest dev, thanks!) and force pushed it to BVLC's
cmake
branch. Future changes to the cmake build system should be PRed against thecmake
branch (rather than the normaldev
branch) until its official merge intodev
. The cmake branch will periodically need to be rebased on dev by someone developing it if it is to be merged; I will force update the cmake branch (and therefore this PR) when that's done. See @shelhamer's very nice explanation of this process in his 2nd followup comment on #610 for details.TODOs for merge into dev:
.travis.yml
..travis.yml
to also successfully perform the CMake build steps, keeping all the current make build steps intact. (You should probably addmake clean
after the make steps are done, and then add the CMake build steps)