[CMake] controlling which instantiations to make for given templates

Hicham Mouline hicham at mouline.org
Thu Mar 19 08:28:24 EDT 2009


Hello,
we have a number of projects, in some of them, we have translation units that define member functions of template classes,
and at the bottom we have explicit template instantiations of those templates:
template class Templ<ArgList1>;
template class Templ<ArgList2>;

it turns out under VS2005/2008 we only need the instantiation with Templ<ArgList1>
while under gcc3 we need Templ<ArgList2>

I saw some aux sources command in cmake that considers a "Template" subdir, but we don't wish to use this method.
Is there any other feature of cmake to help with this?
Otherwise, we will use processor defines to test which env and then choose the appropriate instantiation.

rds,


More information about the CMake mailing list