[CMake] template files (.t) in Windows VCproj builds
Brad King
brad.king at kitware.com
Wed Sep 20 18:31:55 EDT 2006
Philip Lowman wrote:
> Brad King wrote:
>> If they have the same name as a .h or .cc file there is a bug in CMake
>> 2.4.3 that causes this. The work around is to add the HEADER_FILE_ONLY
>> property with SET_SOURCE_FILES_PROPERTIES. It is fixed in CVS CMake and
>> will be fixed in 2.4.4.
>
> So in future releases of CMake is there a list of file extensions that
> CMake will attempt to compile (.c, .cc, .C, etc.) and it treats
> everything else as a header file if you add it to the sources list?
The intended behavior has not changed. A given set of extensions (.c,
.cc, .cpp, etc.) will be compiled. A different set of extensions (.h,
.hh, .hpp, etc.) will be marked as headers automatically (and added to
the Header Files source group by default). Other extensions will simply
be placed in the build system without any special rules.
There is a bug specifically in 2.4.3 that causes the VS IDE generators
to compile sources of unknown extension if they have the same name as
any other source in the target (other than the extension). It has to do
with generation of unique object file names for two sources of the same
name. It has been fixed.
-Brad
More information about the CMake
mailing list