D22721: Clean up Kate addons CMake scripts.

Alex Turbov noreply at phabricator.kde.org
Wed Jul 24 18:42:20 BST 2019


turbov added inline comments.

INLINE COMMENTS

> CMakeLists.txt:67
>  # config.h
> -check_function_exists (ctermid HAVE_CTERMID)
>  configure_file (config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
>  

No need to use `CMAKE_CURRENT_BINARY_DIR` here -- it's the default value.

> CMakeLists.txt:16
> +add_library(katebacktracebrowserplugin MODULE ${katebacktracebrowserplugin_PART_SRCS})
> +target_compile_definitions(katebacktracebrowserplugin PRIVATE TRANSLATION_DOMAIN=\"katebacktracebrowserplugin\")
>  

Raw string literals probably could help to avoid awkward escapes:

  target_compile_definitions(
      katebacktracebrowserplugin PRIVATE 
      [[TRANSLATION_DOMAIN="katebacktracebrowserplugin"]]
  )

need to test...

> CMakeLists.txt:18
>  
> -target_link_libraries(katebacktracebrowserplugin
> -    KF5::TextEditor
> -    KF5::I18n
> +target_link_libraries(katebacktracebrowserplugin PRIVATE
> +  KF5::TextEditor

IMHO this formatting style is much clean:

  target_link_libraries(
    katebacktracebrowserplugin 
    PRIVATE
      KF5::TextEditor
      KF5::I18n
  )

- add the indentation after named keywords with multiple arguments
- leave the open parentheses alone

REPOSITORY
  R40 Kate

REVISION DETAIL
  https://phabricator.kde.org/D22721

To: daandemeyer, #kate
Cc: turbov, asturmlechner, kwrite-devel, domson, michaelh, ngraham, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190724/f3a1dc2e/attachment.html>


More information about the KWrite-Devel mailing list