[CMake] Newbie questions

Alexander Neundorf a.neundorf-work at gmx.net
Wed Nov 10 04:41:22 EST 2004


> Greetings! 
>  
> We are considering changing a relatively large software project away  
> >from the GNU tool suite (Autoconf, Automake, Libtool), and cmake was  
> suggested to us.  I've downloaded it, played with it a little bit, read  
> through the documentation and FAQ, and have looked through the last  
> month or two of activity here on the mailing list.  It is my impression  
> that cmake replaces these three tools by doing per-system tests,  
> traversing directories, compiling source files, and building libraries  
> and applications.  It does this by analyzing all the CMakeList.txt  
> files and emitting "native" build instructions (such as VC++ projects,  
> makefiles, etc.). 
 
Yes. 
 
... 
> I don't actually care about making a library in each subdirectory (we  
> only do that because it is The Automake/Libtool Way), but being able to  
> invoke "make" in each subdirectory is quite a useful thing.  What is  
> the canonical cmake way having lots of source files dispersed  
> throughout an entire tree (some of which may be conditionally compiled,  
> depending on architecture, etc.) compiled into a single, top-level  
> library? 
 
Did you try compiling static libs in the subdirs and linking them later into
a big 
dynamic lib ? Didn't this work ? 
  
> 2. Automake provides two extremely useful targets that I don't see  
> supported in cmake: "uninstall" and "dist". 
>  
> 2a. Since "install" is supported, would it be difficult to implement  
> "uninstall"? 
 
Yes, uninstall is missing. Would be nice if it would be implemented. 
Can't be too hard. 
  
> 2b. "dist" is also quite useful -- it rolls up all the source files  
> that it knows about (and any additional files like README that you can  
> tag to be included) and makes a perfect tarball suitable for  
> distribution (ensuring all the permissions are correct, vim/emacs  
> backup files are excluded, etc.). 
>  
> Are there any plans to support a "dist"-like target that makes a  
> tarball suitable for distribution? 
 
Sounds more complicated. 
  
> 3. Waving my hands and assuming that I can somehow make a tarball that  
> I can distribute to users, do the users need to have cmake installed to  
> build it?  It's not 100% clear to me from reading all the docs and  
> whatnot.  For example, if I run "cmake" on my development tree (such  
> that it makes makefiles) and tar that up, is that suitable for users  
> with a wide variety of POSIX platforms?  More specifically: when I run  
> "cmake", does it make a configuration for *that specific machine*, or  
> is it suitable for any machine that supports "make"? 
 
They need cmake installed. The generated Makefiles are in general not
"portable" to 
another machine, e.g. they contain absolute paths. 
But you could distribute a copy of cmake along with your software, since
it's free 
software :-) 
  
> 4. How good is cmake's support for shared libraries?  One of the main  
> reasons we use Libtool is because it knows how to build shared  
> libraries for a *lot* of different compilers on *lots* of different  
> systems (including the wide variety of compilers available for the  
> Linux platform).  What platforms / compilers does cmake support  
> building shared libraries for? 
 
I don't know. I tested on Linux, Windows and Mac OS X and it worked without 
problems. 
 
Bye 
Alex 
 

-- 
Geschenkt: 3 Monate GMX ProMail + 3 Top-Spielfilme auf DVD
++ Jetzt kostenlos testen http://www.gmx.net/de/go/mail ++


More information about the CMake mailing list