[CMake] force c++
Brad King
brad.king at kitware.com
Thu Apr 6 10:40:21 EDT 2006
Axel Roebel wrote:
> does anybody know how I may force the use of a c++ compiler
> for source files with .c extension?
>
> Before I start renaming nearly 100 files and loose all
> the cvs history I would prefer a solution where cmake would
> allow me to select a compiler for the part of the files
> that require c++ compilation.
FYI, it is possible to rename files in CVS without losing history, but
you have to be careful. Here is how:
1.) Disable write access by all users but yourself.
2.) Create a backup copy of the repository.
3.) On the CVS server COPY each ,v file to the new name:
cp foo.c,v foo.cxx,v
4.) Do a cvs update on one checkout with your user.
cvs up
5.) cvs remove all the original names and commit.
cvs rm foo.c
cvs commit -m "Removing foo.c, the old name for foo.cxx"
6.) Remove all sticky tags from the new names.
cvs tag -d old-tag foo.cxx
7.) Remove all branch tags from the new names.
8.) Restore write access for other users.
I've forgotten off the top of my head if deleting tags works for
branches. To do step #7 you may need to do "cvs update -r old-branch"
to each branch (which should restore the old names too) and then cvs
remove the new names.
-Brad
More information about the CMake
mailing list