Discussion on "add to new target" wizard for CMake
Andreas Pakulat
apaku at gmx.de
Thu May 13 22:59:24 UTC 2010
On 13.05.10 23:37:12, Milian Wolff wrote:
> please read: https://bugs.kde.org/show_bug.cgi?id=237535
>
> I'd be interested in more feedback, what do you guys think? Why would this be
> a bad idea to take this burden off a developer?
>
> And having different templates for "add to new target" would imo still better
> than designated wizards for "new app", "new unit test", "new class", "new
> library", ... or what do you think?
I actually misunderstood and misremembered the problem. I guess having a
buildsystem-page (provided by the buildsystem-manager of the project) in
the create-class-wizard that allows to create a new target if you
selected create-class on a non-target item would be ok.
For cmake this could allow to select from a list of types and ask for a
target-name. Then it'll add the relevant add_executable/add_library/...
line at the end of the cmake file and on the last page the change could
be reviewed just as if it was added to an existing target.
The thing is that we need to draw a line somewhere wrt. the number of
"types" above. In particular do we allow to choose between static and
shared libs? Do we allow to select between doing a macosx-framework or
dylib? Do we allow to choose between a windows-app or a
windows-console-app? Those are flags to add_executable/add_library and
IMHO we shouldn't support any of them, just the basic types that exist.
Else we'll sooner or later end in a maintainenance hell as users keep
asking to add <some special flag-combo>...
> How would we add something like "qt unit test", "kde unit test" only to
> projects that actually use that? Has CMake the knowledge about that?
CMake should know when kde4_add_unit_test is available (IIRC there's no
macro for qt4 unit-tests). Its a macro only available if you
find_package(KDE4).
I'm still not 100% sure wether this is really needed. Adding a new
target is not something you do that often, except for unit-tests maybe.
Unless of course you start several new projects/hour or your project is
still very young :) But as I said above, having an extra page supplied
by the buildsystem with a list of the 5 standard target-types would be
ok for me (if somebody else implements it :P)
Andreas
--
Your best consolation is the hope that the things you failed to get weren't
really worth having.
More information about the KDevelop-devel
mailing list