[CMake] Why does cmake 2.4.0 (beta) compile header files?

Brad King brad.king at kitware.com
Thu Apr 20 17:06:21 EDT 2006


Phillip Hellewell wrote:
> Why does CMake version 2.4.0 cause VS7 to compile header files?
> 
> That's really weird.  I don't even understand what it means to compile a 
> header file, but sure enough, it is doing it.  I think VS7 is dumb for 
> trying to compile a header file, but I know it never had this problem 
> with older versions of CMake.  So could it have something to do with 
> setting ObjectFile, which was put in to fix another bug?
> 
> I've always put header files in my ADD_EXECUTABLE command to get the 
> header files to show up in a VS7 project.
> 
> I don't mind taking the header files out of the ADD_EXECUTABLE command 
> if there is some other place I am supposed to put them to get them to 
> show up in the project.
> 
> I tried adding the list of header files to a SOURCE_GROUP, but that only 
> works if the header files are also part of the ADD_EXECUTABLE.

I cannot duplicate this problem.  Please post a minimal example that

1.) compiles headers with cmake 2.4.0 beta
2.) does not compile headers with cmake 2.2.3

Thanks,
-Brad


More information about the CMake mailing list