Cmake interface target are not shown in Solution explorer

Sysprogs forums Forums VisualGDB Cmake interface target are not shown in Solution explorer

This topic contains 3 replies, has 2 voices, and was last updated by  support 3 weeks, 5 days ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #32690

    oto313
    Participant

    Hello,

    when I create interface target in visualgdb it is not shown in Solution explorer. So I cannot see headers which are included in this target. How can I access these files inside interface target via Solution Explorer. I tried option “Header Files in Solution explorer” set to “All From Target Directory and Subdirectories”. But it did not help. Thanks for help

     

     

    PROJECT(bus LANGUAGES C CXX)

    add_library(bus INTERFACE)

    add_library(yrm::bus ALIAS bus)

    #32694

    support
    Keymaster

    Hi,

    This is a known limitation of CMake. It indeed does not report the contents of interface targets via the mechanism used by VisualGDB.

    Please consider using object libraries instead – they work similar to interface targets, but their contents is actually shown.

    #32699

    oto313
    Participant

    But I have targets that have only header files. I cannot create object library without source files.

    #32704

    support
    Keymaster

    You can work around it by creating an empty .c file and referencing it from the targets that would otherwise have no sources. Another solution would be to patch CMake to make it report interface libraries together with the object libraries, but that could be rather complicated.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.