On 2012-10-22 17:55-0000 Eric Clark wrote:

Awesome! Thank you for the answers and the quick reply! I have only
been using CMake for a little over a year and again I am sorry for
posting an incorrect answer. I always thought that I had to have one
project() call for each add_executable and/or add_library. It is very
good to know that that is not the case. However, I am curious if you
think it is good practice to do such a thing?

To join this conversation late, but to give it a new twist with a new
subject line it is typical practice to have one project() call (done
in the top-level CMakeLists.txt file) for each software project (e.g.,
a complete source tree that is typically distributed as an independent
tarball) no matter how many libraries and executables are built for
that project.

When I first learned CMake years ago I looked at a number of projects
with CMake-based build systems to see what was typical usage, and I
suggest you might want to do the same.

I used to advocate studying the CMake-based build system for PLplot
that I helped to implement, but that was essentially done so many
years ago (although it is still maintained extensively) that I am sure
there are much better best practices out there now especially
considering all the additional useful CMake features that have been
introduced over the years.

I initially did a lot of my learning based on the CMake-based build
systems for CMake itself and also for KDE so one of those might be
worthy studying now, but they also might have the same problem (too
many years of history without necessarily keeping up with best
practices) that PLplot does.

Are the CMake and KDE build systems still the best paradigms for study
or are there better ones for study that can be recommended now?

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); the Time
Ephemerides project (timeephem.sf.net); PLplot scientific plotting
software package (plplot.sf.net); the libLASi project
(unifont.org/lasi); the Loads of Linux Links project (loll.sf.net);
and the Linux Brochure Project (lbproject.sf.net).
__________________________

Linux-powered Science
__________________________
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to