Look for Cppcheck & heaptrack as RUNTIME dependencies
ClosedPublic

Authored by kossebau on Apr 28 2017, 11:44 AM.

Details

Summary

Reporting that RUNTIME dependency in the CMake dependency summary
log helps e.g. packagers to learn it.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
kossebau created this revision.Apr 28 2017, 11:44 AM
Restricted Application added a subscriber: kdevelop-devel. · View Herald TranscriptApr 28 2017, 11:44 AM
apol accepted this revision.Apr 28 2017, 11:46 AM
This revision is now accepted and ready to land.Apr 28 2017, 11:46 AM
kfunk requested changes to this revision.Apr 28 2017, 12:23 PM
kfunk added a subscriber: kfunk.

Uh, careful here. This suggests those binaries are *required* at runtime.

From https://cmake.org/cmake/help/v3.0/module/FeatureSummary.html:

Last, a RUNTIME package is a package which is actually not used at all during the build, but which is required for actually running the resulting binaries.

Please make double-sure packagers are aware this is only a *suggestion*, not required at runtime for KDevelop to function properly. Maybe rephrase the PURPOSE field:
PURPOSE "Suggestion: Required for the heaptrack plugin"?

TBH, I'm not sure we need this patch at all.

cmake/modules/Findheaptrack_gui.cmake
1 ↗(On Diff #13910)

Would merge that into FindHeaptrack.cmake. It's the same project.

This revision now requires changes to proceed.Apr 28 2017, 12:23 PM
This revision was automatically updated to reflect the committed changes.
In D5632#105488, @kfunk wrote:

Uh, careful here. This suggests those binaries are *required* at runtime.

From https://cmake.org/cmake/help/v3.0/module/FeatureSummary.html:

Last, a RUNTIME package is a package which is actually not used at all during the build, but which is required for actually running the resulting binaries.

Please make double-sure packagers are aware this is only a *suggestion*, not required at runtime for KDevelop to function properly. Maybe rephrase the PURPOSE field:
PURPOSE "Suggestion: Required for the heaptrack plugin"?

Okay, will do a fix-up commit.

TBH, I'm not sure we need this patch at all.

One thing that needs improvement currently is that the heaptrack and cppcheck plugins are active by default, and inject their actions into the UI enabled even if there is no cppcheck or heaptrack installed at all. Which was my starting motivation for this patch.
Still if optional I think noting the optional runtime deps in cmake summary result is a good way to make packagers and other people building it aware of these dependencies.

CMake should rather be improved to make RUNTIME something orthogonal to OPTIONAL/RECOMMENDED/REQUIRED.