[CMake] Adding files to a project without building them

Tyler Roscoe tyler at cryptio.net
Tue Jun 30 10:30:24 EDT 2009


On Tue, Jun 30, 2009 at 03:10:41PM +0200, Benjamin Schindler wrote:
> Visual Studio users, this is not yet good enough: The files which are 
> not included in an add_executable are not visible in the Visual Studio 
> solution/project which is quite a pain. For header files this is no 
> problem because I can just add them to the executable/library, but for 
> xsd and other files, this is a problem as Visual Studio actually invokes 
> some tools on the files which it should not.

What do you mean by "Visual Studio actually invokes some tools on the
files which it should not"? What happens when you add these sources to
your add_*() command?

Does it help to mark those files as HEADER_FILE_ONLY?

http://www.cmake.org/cmake/help/cmake2.6docs.html#prop_sf:HEADER_FILE_ONLY

tyler


More information about the CMake mailing list