On Sun, Mar 25, 2007 at 04:00:42AM +0200, Peter Kümmel wrote: > Andre Poenitz wrote: > > I just tried cmake (again). > > > > A problem I have on Linux is that it looks fo some libiconv. > > Such a lib is not present on my system (I only have a binary > > and some header), but does not seem to be needed either. > > You could disable this dependency: > cmake/CMakefiles line 59: > #find_package(ICONV REQUIRED) > > (# is for comments)
That's what I did in the end. > But are you sure we don't need iconv? I don't know, it compiles and works without libiconv* on my system. > > Two questions: > > > > 1. How do I create debug or profiling enabled build? > > I'm not very familiar with the gcc flags on Linux and > currently only the defaults of cmake are used: > default is without flags, the command line option > -DCMAKE_BUILD_TYPE=Release > enables -O3 and -DNDEBUG. But I could add any wished flags > controlled by a command line option, or enable it by default. Ok, so I'd line to have the release options plus -pg on compilation and linking and name the option -DCMAKE_BUILD_TYPE=Profile. > > > > > 2. The generated Makefiles look a bit funny: > > > > # target to build an object file > > suse/usr/src/lyx/trunk/src/LaTeXFeatures.o: > > You build in-source? No. > You could switch to a build > directory and call there cmake ../trunk/development/cmake > (the path to the cmake dir nd trunk) That's what I did. > > cd /suse/usr/src/lyx/build && $(MAKE) -f > > src/CMakeFiles/lyx-qt4.dir/build.make > > src/CMakeFiles/lyx-qt4.dir/suse/usr/src/lyx/trunk/src/LaTeXFeatures.o > > > > # target to preprocess a source file > > suse/usr/src/lyx/trunk/src/LaTeXFeatures.i: > > cd /suse/usr/src/lyx/build && $(MAKE) -f > > src/CMakeFiles/lyx-qt4.dir/build.make > > src/CMakeFiles/lyx-qt4.dir/suse/usr/src/lyx/trunk/src/LaTeXFeatures.i > > > > # target to generate assembly for a file > > suse/usr/src/lyx/trunk/src/LaTeXFeatures.s: > > cd /suse/usr/src/lyx/build && $(MAKE) -f > > src/CMakeFiles/lyx-qt4.dir/build.make > > src/CMakeFiles/lyx-qt4.dir/suse/usr/src/lyx/trunk/src/LaTeXFeatures.s > > > > Is it necessary to have the .s and .i targets? > > This is "internal" to the cmake generated build process > and I don't know how to change them, but I think it is not > necessary to fully control those files - these files are > not important to understand cmake (at least for me). Not really, but it makes Makefiles three times bigger than they need to be (not _really_ important) and the 'cd ...' part somehow does not look optimal either (not _really_ important either as long as the result is not slower than the automake Makefiles). Andre'