[Cmake] CMake Bug: Support caps ext (.C .H)

Nitin Gupta ngupta at GlobespanVirata . com
Wed, 24 Sep 2003 09:46:12 +0530


Hi Andy,

> The thing is that several people on Unix (non cygwin, non Mac OSX) use
> capital C and  capital H for C++ files. This can be a problem though if
> you copy files from windows machine and preserve capital extension.

OK. Then there is a bit of inconsistency in the code. The function
cmSystemTools::FileFormat cmSystemTools::GetFileFormat(const char* cext)
would return C_FILE_FORMAT for .c and .C files with extension. I'm looking
into CMake 1.6.7 released.

> That said, in one of the future version of cmake we plan to replace
> static extensions with dynamic ones, so they will be defined in the
> cmake variables. This way you will be able to let say define .c55 to be
> your c++ extension and .ce do be your C extension.

Looking forward for this change.

Thanks and Regards,
Nitin

> 
> On Tue, 2003-09-23 at 10:52, Nitin Gupta wrote:
> > PROBLEM: If the extension of any of source file
> > 	   is caps C or H CMake assumes the project
> > 	   contains CXX files. Hence it picks CMAKE_CXX_FLAGS
> > 	   as default compile flags.
> > DIAGNOSIS: cmTarget::HasCxx() returns true in the file
> > 	   extension of any of the file is caps C or caps H.
> 
>