[CMake] Listing header files in Visual Studio

E. Wing ewmailing at gmail.com
Tue Jan 18 08:58:05 EST 2005


I tried a very simple ADD_CUSTOM_TARGET which just listed all the
files as dependencies, but this wasn't sufficient.

For the dummy file, Is there a way to detect in CMake if a Visual
Studio project is being generated. I would prefer to isolate this case
in a VS only block.

Thanks,
Eric

 

> As far as I know this is not supported as a feature, but there may be
> ways to do it.  One easy way is just to add a library with a dummy
> source file and then list all the headers.  As long as nothing links to
> it it shouldn't affect anything.  There might also be a way using
> ADD_CUSTOM_TARGET, but I don't know off the top of my head how it might
> work.
> 
> You can add this as a feature request:
> 
> http://www.cmake.org/Bug
> 
> thought it probably won't be implemented for a while.
> 
> -Brad
>


More information about the CMake mailing list