Fix ENABLE_CLAZY option with clazy >= 1.5
ClosedPublic

Authored by elvisangelaccio on Feb 2 2019, 5:50 PM.

Details

Summary

clazy 1.5 renamed its plugin from from ClangLazy.so to
ClazyPlugin.so and from clang-lazy to clazy.

Diff Detail

Repository
R240 Extra CMake Modules
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 7824
Build 7842: arc lint + arc unit
elvisangelaccio created this revision.Feb 2 2019, 5:50 PM
Restricted Application added projects: Frameworks, Build System. · View Herald TranscriptFeb 2 2019, 5:50 PM
Restricted Application added subscribers: kde-buildsystem, kde-frameworks-devel. · View Herald Transcript
elvisangelaccio requested review of this revision.Feb 2 2019, 5:50 PM

Note: this will break with older clazy versions. I'm not sure how to prevent that.
One could argue that a developer interested in clazy should probably run the latest version anyway...

anthonyfieroni added inline comments.
kde-modules/KDECMakeSettings.cmake
296–301

You can use

find_library(CLAZY ClazyPlugin${CMAKE_SHARED_LIBRARY_SUFFIX})
if(NOT CLAZY)
  ....
else
  ....
endif()
arojas added a subscriber: arojas.EditedFeb 2 2019, 6:33 PM

You also need to change '-Xclang -add-plugin -Xclang clang-lazy' to '-Xclang -add-plugin -Xclang clazy' for the plugin to actually be used.

elvisangelaccio marked an inline comment as done.

Addressed comments

elvisangelaccio edited the summary of this revision. (Show Details)Feb 3 2019, 5:19 PM
apol accepted this revision.Feb 4 2019, 11:44 AM

LGTM, thanks!

This revision is now accepted and ready to land.Feb 4 2019, 11:44 AM
This revision was automatically updated to reflect the committed changes.