[CMake] removing a target from the all target
Axel Roebel
Axel.Roebel at ircam.fr
Tue Oct 31 09:00:26 EST 2006
Hello,
I have a number of libraries and executable targets in my project
where only the executable targets are commonly used for installation.
The libraries implement the same code as the executables and will be used
only under very specific conditions.
Unfortunately cmake creates makefiles that apparently
will build all targets before proceeding to do the installation.
This means that even if I don't have an install rule for a target, it will
nevertheles be build before the install rule is excuted.
Given the fact that a build for the libraries that are not going to be
installed takes 15 minutes, I wonder which options I have to
unlink them from the list of targets to be build prior to installation.
An obvious solution would be to move all the build instructions
for these libraries into a sub directory which is added with the
exclude from all option.
A second solution is the creation of optional targets using the option
macros. This however, would require reconfiguration, which I don't like to
be necessary because the people that need ton compile the library version of
the project will not understand what they have to do.
I wonder whether anybody
sees a simpler solution to the problem, like a simple target property
that will remove the traget from the list of targets linked
to the "all" target.
Thanks for any comment,
--
Axel Roebel
IRCAM Analysis/Synthesis Team
Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540
More information about the CMake
mailing list