AUG
6
2006
|
Yet another CMake BlogSince everyone else is blogging on build systems today, I thought I'd join in. Overall CMake seems to be working out ok, but like anything else, it is not without its problems. One problem I had with it was fixed in the new release this weekend though - you no longer need to write: IF something do stuff ELSE something do other stuff ENDIF something I don't understand why it was written like that in the first place, but hey it's fixed so lets move on. The other issue I have is more serious - the command line usage is frankly awful. Accordingly I'd like to know what people would like to see in a 'configure' wrapper script that lets you invoke cmake without -DSOME_VERY_OBSCURE_COMMAND in order to something as simple as tell it where to install. The things that I think need to be in there so far are:
Anything else that should be provided?
|
![]() |
Comments
What about x86-64 cross compilation flags?
Forcing 32-bit versus 64-bit would be nice for multi-arch systems. Also, there are other flags that might be nice like the old configure script had.....
-----------------------------------------------------------------
Maintainer of KDE for the PhoeNUX OS project.
Developer of the Phinos installer.
http://www.kde-apps.org/content/show.php?content=43465
instead of a configure wrapper...
... there's the idea to make configurable "shortcuts" for the command line options.
So we would have a file something like this
CMakeShortcuts.txt:
CMAKE_INSTALL_PREFIX:prefix
LIB_INSTALL_DIR:libdir
and then instead of
cmake ... -DCMAKE_INSTALL_PREFIX=/opt/kde4 -DLIBINSTALL_DIR=/foo/lib
you could write
cmake ... --prefix=/opt/kde4 --libdir=/foo/lib
This is intended to be done in cmake, but hasn't happened yet.
Maybe I'll have a look at it.
OTOH there's also ccmake to set this stuff, and q Qt4 version of it is still missing (anybody wants to try ?)
I don't think writing a wrapper script named "configure" is a good idea, since it will make people expect that it behaves exactly like configure.
Alex
configure
Rich,
I started just this sort of script (i'll send it to you in a separate message). I even asked about it on kde-buildsystem. Where it was shot down as a bad idea.
The consensus was to have configure script that outputs the cmake command to call. So if you go ./configure --prefix /usr, it will say "KDE does not use autoconf anymore, next time use cmake -D...
shot down?
Hmm, it was shot down? I hope it was for a different reason as alex on this blog stated; that he expects a feature to be added to cmake in a future release.
A good working configure script which we have now and that does what 95% of our users expect is always better then a not-yet-created solution.
Anyway; I think this email states the consensus among core devs:
http://lists.kde.org/?l=kde-core-devel&m=114975191215629&w=2
So, please continue working on what you feel is a good solution.
All the power to you! :-)
Ashley forwarded me the
Ashley forwarded me the emails from the build system people, and yeah, they weren't keen. I'm going to write it anyway though as I definitely not going to type -DSOMETHING_RIDICULOUS more often the absolutely necessary. I'll make the script available to everyone once I'm done irrespective of if it is suitable for going in svn.