[Cmake] SOURCE_FILES default extension

William A. Hoffman bill.hoffman at kitware.com
Thu Jan 24 08:47:20 EST 2002


I think the best thing we can do at this point is to make it an 
undocumented feature.
We change all the projects that are using it, change all the examples, and 
change the
cmake documentation.   If a new user finds out about it, then so what.
I would like newer versions of cmake to still be able to build VTK 4.0 for 
at least 6 months to a year.
We have already made the VTK 4.0 branch, and do not want to make a massive 
change like
this on the branch.   Soon we will be printing a 1000 CD's, and if someone 
happens to have a newer
cmake, it should work.

-Bill

At 09:43 AM 1/24/2002 +0000, Geoffrey Cross wrote:

>I agree with Bill L: I think it should be mandatory to put an extension
>on the file name.  Can't we provide a script which will fix the
>cmakelists and give a warning for a short while before breaking
>projects?  As with VXL, there are inevitably going to be times when you
>need to break things for the sake of sanity, and I think this is an
>example.
>
>Geoff.
>
>
> > -----Original Message-----
> > From: cmake-admin at public.kitware.com
> > [mailto:cmake-admin at public.kitware.com] On Behalf Of Bill Hoffman
> > Sent: Tuesday, January 22, 2002 8:37 PM
> > To: Lorensen, William E (CRD)
> > Cc: cmake at public.kitware.com
> > Subject: Re: [Cmake] SOURCE_FILES default extension
> >
> >
> > Cmake looks for the file with no extension first, then tries
> > cxx cpp, mm, h, etc. At one point I thought it would be
> > better if you had to give the extension. However, at this
> > point, it would be hard to change all the projects using
> > cmake. I guess it could be a style for list files, that you
> > should use the full file name, but I would not want to
> > break/change existing projects.
> >
> > -Bill
> >
> >
> > At 03:40 PM 1/22/2002 -0500, Brad King wrote:
> >
> >
> > >---------- Forwarded message ----------
> > >Date: Tue, 22 Jan 2002 13:49:28 -0500
> > >From: "Lorensen, William E (CRD)" <lorensen at crd.ge.com>
> > >To: cmake at public.kitware.com
> > >Subject: [Cmake] SOURCE_FILES default extension
> > >
> > >How does cmake find the extension to use in the SOURCE_FILES
> > statement?
> > >
> > >I just had an example that used VTK and ITK. My SOURCE_FILES line
> > >looked like this SOURCE_FILES(Distance_SRCS Distance
> > >Options
> > >)
> > >
> > >The first time cmake generated the Makefile, it correctly
> > guessed the
> > >extension as "cxx". I successfully built the program (called
> > Distance).
> > >Then I edited the source file and did another gmake. cmake
> > generated a
> > >new Makefile with the compile line using the executable name rather
> > >than the .cxx file. Seems that the second time, it found
> > that the file
> > >listed in the SOURCE_FILES was there (the executable this time) and
> > >messed up my Makefile. If I remove the Distance file and
> > rerun cmake,
> > >it generates the correct Makefile.
> > >
> > >To fix the problem, I changed my command to:
> > >
> > >SOURCE_FILES(Distance_SRCS
> > >Distance.cxx
> > >Options.cxx
> > >)
> > >
> > >and all was fine.
> > >
> > >Seems that cmake should REQUIRE an extension on these source files.
> > >
> > >Bill
> > >
> > >
> > >_______________________________________________
> > >Cmake mailing list
> > >Cmake at public.kitware.com
> > >http://public.kitware.com/mailman/listinfo/cmake
> >
> > _______________________________________________
> > Cmake mailing list
> > Cmake at public.kitware.com
> > http://public.kitware.com/mailman/listinfo/cma> ke
> >
> >
>
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake




More information about the CMake mailing list