[CMake] Multiple "projects" one directory

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sat Apr 28 04:07:03 EDT 2018


On 2018-04-27 22:06-0000 Scott Bloom wrote:

> I have a rather complicated Qt based project.
>
> We are looking at rolling out a subset tool, and it will be significantly smaller in functionality.
>
> For that mode, I would like to set a CMake variable LITEVERSION that builds the tool with -DLITEVERSION defined.
>
> however, one (or two) folders, the main executable (and possibly the main window folder), and I would like include into the tool with this turned on, and with it turned off
>
> Is that possible?
>
> Other times I have done this, I just have two build areas.. But 90% of this code base is the same, and will be built independent of the flag. So Id rather not build it twice

Hi Scott:

My opinion is two build areas is actually the way to go.  Also, have
you considered using ccache?  With that software (see
<http://ccache.samba.org/>, rebuild costs tend to be negligible so
that two build areas which build largely the same code will not cost
that much more to build than one build area.

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
__________________________


More information about the CMake mailing list