On Mon, Mar 7, 2016 at 9:19 PM, Eric Wing <ewmail...@gmail.com> wrote:

> On 3/7/16, Eric Wing <ewmail...@gmail.com> wrote:
> > On 3/7/16, David Cole <dlrd...@aol.com> wrote:
> >> If you include those files in the source list for a library, executable,
> >> or
> >> custom target, they should show up in IDE projects, and they should be
> >> ignored by Makefile type projects. Have you tried that?
> >>
> >>
> >> David
> >>
> >
> > I haven't tried it yet since I was wondering what the best approach was
> :)
> > Since some of my files are somewhat project oriented instead of target
> > oriented, I wasn't sure if putting them the library/executable targets
> > was best. But if it is, I'll try that.
> >
> > Thanks,
> > Eric
> >
>
> Well, I gave it a try. So far, it looks good.
>
> Thanks,
> Eric
>

I usually do this to make my IDE aware of files:

add_custom_target(MyProject_HDRS SOURCES MyHeader.h MyImplementation.hpp)

It sounds like David says you can do the same for your .cmake files. This
is pretty awkward though - it seems like there should be more of an
explicit function for this, something like:

add_files_to_IDE(MyHeader.h MyImplementation.hpp)

This would make it much more clear what this line is for and would prevent
forcing this "abuse" of the concept of a target for a very common use case.

David
-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to