On Montag, 20. Juli 2015 23:07:00 CEST, Allen Winter wrote:
For years I have passed -DKDE4_ENABLE_HTMLHANDBOOK=1 to cmake
when building KDE projects.
As of today I get this error:
CMake Error at cmake/modules/KDE4Macros.cmake:315 (add_custom_target):
add_custom_target cannot create target "htmlhandbook" because another
target with the same name already exists. The existing target is a custom
target created in source directory
"/data/mykde/src/KDE/kdelibs/doc/kioslave/data". See documentation for
policy CMP0002 for more details.
Call Stack (most recent call first):
doc/kioslave/file/CMakeLists.txt:2 (kde4_create_handbook)
add "-DCMAKE_POLICY_DEFAULT_CMP0002=OLD"
This target relied on behavior that's been deprecated in CMake 2.6 (ie. like
centuries ago)
The stupid thing here is that before CMake 3.0(?) one would have gotten a
warning to fix that, but things would still have worked - but that warning was
silenced by FindKDEInternal.cmake
Until Stephen removed that with
http://quickgit.kde.org/?p=kdelibs.git&a=commit&h=dda2199d601491c6ceb07b5f11c8696216558623
While in theory a good idea (ppl. should really know that things are *gonna* break if they don't fix
it), the default is "NEW" in CMake versions in the wild (>3.0) and configuration fails
with an error instead of telling developers to "please fix your shit".
Ie. Stephens change actually comes rather (too) late.
It's however now mandatory, since apparently the OLD behavior is gonna removed
soon, so things must be fixed, or will completely fail with upcoming CMake
versions.
Wrt this, I'd actually say that "yes, we need those patches in frozen kdelibs" - they
don't fix, but expose bugs. (while ideally, the policy update should not have been stashed itfp,
but we don't live in "should-land")
Alternatively, we'd have to declare maximum cmake versions for kdelibs :-\
Cheers,
Thomas