[CMake] Newbie question

Christian Convey christian.convey at gmail.com
Sun Feb 25 15:21:42 EST 2007


Thanks Alan.

I went ahead an broke my project into a top-level CMake file, plus one
for a subdirectory containing library code, and one for a subdirectory
containing library-demo code.

That seems to work so far, EXCEPT:  when the path to the subdirectory
includes a directory with a space in the name (".../Simple IO/..."),
the build seems to fail.  (CMake is happy, make is not.)

On Linux, is there a way to cause the Makefiles produced by CMake to
be ok with pathnames that include spaces?

Thanks again,
Christian

On 2/25/07, Alan W. Irwin <irwin at beluga.phys.uvic.ca> wrote:
> On 2007-02-25 13:34-0500 Christian Convey wrote:
>
> > (Couldn't spot this in the docs - sorry if it's obvious...)
> >
> > I've got a project that involves a library, and several demo apps that
> > use that library.
> >
> > - Is there a strong reason to avoid using a single CMake file to
> > express the logic for building the library and the apps?
>
> No.  This is done all the time.
>
> >
> > - How do I express the fact that each app is dependent on the library
> > already being built?  (When I use "TARGET_LINK_LIBRARIES", cmake seems
> > upset that the library, which hasn't yet been built, doesn't exist at
> > the time I run cmake.)
>
> You probably have to reorder how your targets are specified. The ADD_LIBRARY
> and ADD_EXECUTABLE commands should occur before your TARGET_LINK_LIBRARIES
> command.
>
> Alan
> __________________________
> Alan W. Irwin
>
> Astronomical research affiliation with Department of Physics and Astronomy,
> University of Victoria (astrowww.phys.uvic.ca).
>
> Programming affiliations with the FreeEOS equation-of-state implementation
> for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
> package (plplot.org); the Yorick front-end to PLplot (yplot.sf.net); the
> Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project
> (lbproject.sf.net).
> __________________________
>
> Linux-powered Science
> __________________________
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>


More information about the CMake mailing list