[CMake] Listing header files in Visual Studio
Brad King
brad.king at kitware.com
Tue Jan 18 07:55:50 EST 2005
E. Wing wrote:
> It turns out that one of the subdirectories contains only header files
> which are C++ templates. In this case, I can't use ADD_LIBRARY since
> there are no implementation files to make a library. Thus, I cannot
> use this mechanism to list all my header files in this directory.
>
> My Visual Studio users are complaining because they would like to see
> these files in the IDE. Is there an easy way I can get CMake to
> create a "figure-head" project for this directoty that displays the
> header files inside?
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