[Cmake] SOURCE_FILES default extension
Geoffrey Cross
geoff at robots.ox.ac.uk
Thu Jan 24 04:43:13 EST 2002
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
>
>
More information about the CMake
mailing list