CMake Proposal
Bill Hoffman
bill.hoffman at kitware.com
Mon Feb 22 12:58:39 MST 2010
Hi,
Dan Shearer asked me to join the discussion about Samba using CMake as a
build system. I am a CMake developer, and of course would be very happy
if Samba were to adopt CMake as a build tool.
I have read the thread on this list and would like to address some of
the questions that came up.
- command line interface to CMake and -Dvar=value is verbose
This is true, and there has been talk about creating a more natural
--var type interface for CMake projects. I suspect we will implement
one of these options at some point in the future, however, I would not
see this as a show stopper. cmake-gui and ccmake are good ways to
handle the options in a CMake project interactively.
- You want to be able to do this:
make test TESTS=regex
make testenv
For the first one, in CMake, that would be done with
make test ARGS="-R regex"
I am not sure what make testenv does, so I can not yet comment on that
one...
- binary builds of CMake
We produce binaries for various platforms that can be found here:
http://www.cmake.org/cmake/resources/software.html
The linux binary is static and built on a VERY old version of linux and
is there for compatible with just about every version of linux we have
seen. Please let me know if you find an intel linux system where it
does not run. We also support the big commercial UNIX vendors as well.
You can see that on the dashboard:
http://www.cdash.org/CDash/index.php?project=CMake
If you have other platforms you need like True64, I would be very happy
if you could do nightly CMake builds.
- cross compile questions
CMake does have cross compiling support, to support code generators,
you create two build trees, one for the host and one for the target.
The target build tree can "import" built targets from the host system,
and use them as code generators.
- adding unsupported compilers
It should be possible to add new compilers without changing the CMake
binary. The support files for the compiler can be put into Samba
itself, and later ported to CMake.
- A request for non-timestamp based file comparison.
I think this one conflicts with this comment: "scons horribly slow over
CMake ", I suspect that the checksums might be part of that problem.
However, the use case given was a header file generator program that is
modified, and then regenerates all of the header files causing a big
rebuild. This can be avoided in a different way. Basically, you have
the generator create a temporary header, then a different custom command
can use that as input, the second command uses copy if different to
create the actual header file. Then the header file only changes when
it really changes.
- Blender was given as a project that uses scons, it also has a CMake
build system... :)
Hope this helps, and if you have any other specific questions about
CMake, please ask.
Thanks.
-Bill
More information about the samba-technical
mailing list