[CMake] add files to visual studio without compliation
Amitha Perera
perera at cs.rpi.edu
Wed Oct 13 13:19:29 EDT 2004
On Wed 13 Oct 2004, Jan Woetzel wrote:
> However, I don't want to rename [from .cpp to .txx], because
> (1) I don't like renaming in CVS ...
Yes.
> (2) some users use implicit template instantation and compile the
> .txx/.cpp files directly (without using the explicitly instantiated
> library).
No. :-) If you use implicit instantiation, then your users have, in
their .cpp file,
#include "mytemplate.h"
#include "mytemplate.txx" // or .cpp, in your case
They would not directly compile the mytemplate.txx. With explicit
instantiation, the user would only
#include "mytemplate.h"
and rely on your library to provide the instantiations. In either
case, the .txx file is never directly compiled. In the former case,
the .txx is included in to the users program; in the latter case, it
is included into your explicit instantation .cpp file. I think
renaming is the better solution in the long run.
[ This reasoning does not hold if you have export support and use it,
but none of the Microsoft compilers support export. ]
This is all just my opinion, so I'll stop replying now. :-)
Cheers,
Amitha.
More information about the CMake
mailing list