cmake_format icon indicating copy to clipboard operation
cmake_format copied to clipboard

Formatting bug with the PRIVATE keyword

Open refaelsh opened this issue 4 years ago • 1 comments

Hi all,

Please take a look at this sample file:

 target_link_libraries(
  giter
  PRIVATE Threads::Threads
          dl
          ${CMAKE_CURRENT_SOURCE_DIR}/../target/release/libmvm.a
          wx_gtk3u_xrc-3.1
          wx_gtk3u_core-3.1
          wx_gtk3u_adv-3.1
          wx_gtk3u_richtext-3.1
          wx_baseu-3.1)

Running cmake-format on the above sample does nothing, no formatting occurs. If I delete the PRIVATE Threads::Threads lines, the formatting works.

Thanks all.

refaelsh avatar Jan 23 '21 19:01 refaelsh

no formatting occurs.

I think the formatting has already occured. That looks like the default formatting when using PRIVATE.

PRIVATE, PUBLIC, INTERFACE all introduce a new level of indentation, since they can all be used within the same target_link_libraries.

cheshirekow avatar Apr 05 '21 04:04 cheshirekow