CMake Questions

Matt Rogers mattr at kde.org
Sat Mar 18 16:04:06 GMT 2006


On Saturday 18 March 2006 09:22, Alexander Neundorf wrote:
> Hi,
>
> On Saturday 18 March 2006 14:19, Laurent Montel wrote:
> > On Saturday 18 March 2006 04:36, Allen Winter wrote:
> > > Howdy,
> > >
> > > Ok, I have cmake working to create the kdelibs4_snapshot Makefiles and
> > > 'make' works just fine. A couple questions:
> > >
> > >  - how to tell cmake to do the equivalent of the --enable-debug=full
> > > configure option
> >
> > cmake -DKDE4_ENABLE_FINAL="ON"
>
> Laurent, he didn't ask for enable-final, but enable-debug ;-)
>
> So, start ccmake and set CMAKE_BUILD_TYPE to "debug" or use
> -DCMAKE_BUILD_TYPE=debug
>
> Check out FindKDE4Internal.cmake to see what this does. Currently all it
> does is to set the compiler flags to "-O0 -g" (look for
> CMAKE_CXX_FLAGS_DEBUG). If these are not sufficent/appropriate/otherwise
> unsatisfying, let me know.
>

the flags for various levels of debug that should be used were discussed 
awhile back. 

from admin/acinclude.m4.in

full debug (enable-debug=full) should have the following flags:
-g3 -fno-inline $CFLAGS

debug (just enable-debug) should have:
-g -O2 -fno-reorder-blocks -fno-schedule-insns -fno-inline $CFLAGS

release should have:
-O2 $CFLAGS

this should be good at least for linux/unix, but i don't know about the other 
features.

> > >  - how to tell cmake to enable/disable features (like --disable-cups)
>
> When using ccmake, you will see a bunch of option "WITH_FOO". Set them to
> FALSE or OFF or 0 to disable the feature (or use -DWITH_FOO=OFF)
>
> > >  - how to tell cmake to use/not use packages (like --without-tiff)
>
> What's the difference to above ?
>
> > >  - would it be possible to create Makefiles that unsermake can use?  if
> > > so, we could still have some nice things that unsermake provides, like
> > > the progress percentage, colors, simplified/clarified make output...
>
> To see short compiler output, remove the "set(CMAKE_VERBOSE_MAKEFILE ON)"
> in the toplevel CMakeLists.txt.
> For colored output, maybe use color-gcc or what it's called.
> For percentage, well, that's currently not available.
>
> In theory it should be possible to implement an unsermake generator for
> cmake, but I don't think we should put effort into this now.
> Maybe later, once we have everything setup corretly to work without
> problems with cmake.
>
> Bye
> Alex




More information about the kde-core-devel mailing list