Bug 162606 - allow to store kdevelop files outside project root.
Summary: allow to store kdevelop files outside project root.
Status: REOPENED
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (show other bugs)
Version: 5.11.230400
Platform: Gentoo Packages Linux
: VLO wishlist
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-25 17:27 UTC by Oleh Kravchenko
Modified: 2023-05-01 07:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Oleh Kravchenko 2008-05-25 17:27:58 UTC
Version:            (using KDE 3.5.9)
Installed from:    Gentoo Packages
OS:                Linux

I write cross-country platform appendices under various IDE, very much it would be desirable to have in such structure kdevelop:

project_name
  |
  +-- include
  +-- project
  |    |
  |    +-- bcb6        ; borland builder c++
  |    +-- cmake
  |    +-- doxygen
  |    +-- evs4        ; embedded visual studio
  |    +-- kdevelop
  |    +-- vs6
  |    +-- vs7
  |    \-- vs8         ; visual studio
  |
  +-- shared
  +-- source
  \-- target

in current version 3.5.9 very difficultly configure kdevelop for such structure.
Comment 1 Andreas Pakulat 2008-05-25 21:43:37 UTC
Thanks for reminding me of this one, I somehow lost it on my todo lists. This will be done for KDevelop4.
Comment 2 Oleh Kravchenko 2011-03-23 07:45:07 UTC
kdevelop4 support cmake :)
Comment 3 Milian Wolff 2011-03-29 11:38:32 UTC
the project files (foo.kdev file and .kdev folder) are hardcoded. probably they will stay like this until someone steps up with a good patch. But this bug is not yet fixed.
Comment 4 Ivan Pessotto 2023-04-30 08:07:50 UTC
I don't know if it's bad practice or not to resume this old "bug", but I think this issue should be addressed.

CMake allow to specify a source and a build folder with command line parameters -S <src> and -B <build> respectively, and even the cmake-gui allow to select the two of them.
It's usefull to move all source files (including root CMakeLists.txt) in a separate folder other than project files, so you can share source files with users using different IDE without the need to .gitignore them.

Like this:

root folder
  |
  +-- build/
  |     |
  |     +-- <output build files>
  +-- src/
  |     |
  |     +-- <input source files>
  |     +-- CMakeLists.txt
  |     +-- main.cpp
  +-- .kdev4/
  |     |
  |     +-- <user preferences files>
  +-- project.kdev4

With this layout the git repo can be inside the src/ folder if you want to share only the sources, or in the root if you want to share both sources and project files.
Comment 5 Oleh Kravchenko 2023-04-30 08:19:02 UTC
It is very old request from me :)
I think we can close it.

After 15 years it doesn’t make any sense because CMake really does the job.
Comment 6 Ivan Pessotto 2023-04-30 09:34:08 UTC
Yes, CMake does it, but not kdevelop !

You cannot set kdevelop to invoke CMake using separate folders, it always treat project folder as source folder also.
I have tried to set the CMake parameters -S ... and -B ... in project configuration, but when start configuring it invoke CMake appending the project root folder at the end of the command line, resulting in a warning: "Ignoring extra path from command line"
Comment 7 Oleh Kravchenko 2023-05-01 07:48:40 UTC
I agree.
Let's it open again :)

May KDevelop developers put their opinion.