https://bugs.kde.org/show_bug.cgi?id=375745

            Bug ID: 375745
           Summary: cmake subprojects in a single session
           Product: kdevelop
           Version: unspecified
          Platform: Compiled Sources
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Build tools: CMake
          Assignee: kdevelop-bugs-n...@kde.org
          Reporter: rjvber...@gmail.com
  Target Milestone: ---

I have a CMake-based project that can be configured as follows:
- build everything (host application + library, default)
- build the host application and associated infrastructure only (a bit like
VLC)
- build only the library (think libVLC)

At the cmake level this is implemented very simply with add_subdirectory()
calls that are or are not made.

What I'd like to be able to do is:
- maintain a single source directory
- maintain 2 (out-of-source) build directories, one for the host, one for the
library. There are good reasons why I want a separated approach like this,
instead of using a single build directory and telling make to build only a
specific target.

I'd then like to open projects for both in a single KDevelop session so that I
can edit files from both parts of the actual source project with full parser
support.

This turns out to be very tricky. It seems that the CMake project manager maps
a given open file to a given session project by matching the project toplevel
directories to the file path on a first-come basis. 

Currently there's only one way to achieve something more or less what I am
looking for, and that's by adding multiple build directories to a single
project. That'd work if
- cmake weren't invoked automatically each time one changes build directories
- changing build directories were possible without diving into the project
configuration dialog. Ideally there'd be a pop-up menu (or contextmenu submenu)
for each file that's part of a project that lists the known build directories
that build the file in question. I think that information is readily available
from the compile_commands.json files from the build directory roots.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to