[CMake] CMake in Vim

Marc Weber marco-oweber at gmx.de
Sat Sep 28 16:35:55 EDT 2013


You want feedback?
First: You're false. CMAKE is not the *only* way to build C/C++
projects.
In fact I've tried rewriting the make system of Vim using cmake and ran
into trouble then gave up because it would have taken too much time.

Adding includes for invividual .c files is a major problem.
Should be easy to find my bug report. There are quite a lot of
additional solutions for problems, such as ninja etc.
Maybe it was resolved, maybe not.

cmake has a horrible macro language. Even simple tests are hard to write
unless you can use an existing module.

If you don't believe me proof me wrong and rewrite the configure system
of Vim :)

But I agree that it it does build many common things easily. I myself
turned a big project and made it be built by cmake.

But please think twice about using words like "the only".

Interesting alternatives takes on building software:
http://gittup.org/tup/
https://github.com/apenwarr/redo
(googling for those names at once may yield litss with additional
interesting projects)

I also wrote a make like system:
github.com/MarcWeber/rumake which can tell you how long a second build
is likely to last by taking into account previous runs and it will
rebuild a target if the build command changes. (I'm not sure its that
useful to others. I wrote it to solve one problem).

Neither cmake nor autoconf support parallel configuring.
If you're interested I can sent you a very simple ruby code which
ilustrates how such systme could look like.

> http://jalcine.github.io/cmake.vim/
The only feature I can see is
:CmakeCreateProject <build-dir-name>
so I guess it does not much more than running
( cd $buildDir; cmake $orig-dir) ?

Try to make it clearer what the project provides and what not.
Thus: why should a user install your plugin?

without plugin you have to do:
  this..
  this..
  this..

using your plugin:
  this (much shorter?)

The the user sees immediate benefit. Users who are interested in your
plugin should already know cmake.

Plugins you eventually want to know about:
https://github.com/MarcWeber/vim-addon-errorformats
An alternative way to spceify error formats only.

https://github.com/MarcWeber/vim-addon-action://github.com/MarcWeber/vim-addon-actions
An alternative way to to bind two actions:
  1) set errorformat (using the previously mentioned plugin)
  2) run make (eg in background)

to a key or F2, F3, F4 or buf write.

If you make me understand why your plugin is needed I'll add a short
summary to my wiki (everybody is welcome to contribute to it):
http://vim-wiki.mawercer.de/wiki/index.html

Keep on announcing your work and what you do. People are listening :)

Take care
Marc Weber


More information about the CMake mailing list