cheshirekow / cmake_format

Source code formatter for cmake listfiles.
GNU General Public License v3.0
958 stars 105 forks source link

Custom command -- add USES_TERMINAL to kwargs #140

Closed amerlyq closed 4 years ago

amerlyq commented 4 years ago

Before and After:

add_custom_target(run_${PROJECT_NAME}
  COMMAND ${_cmd}
  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
  USES_TERMINAL
  VERBATIM
)

add_custom_target(
  run_${PROJECT_NAME}
  COMMAND ${_cmd}
  WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} USES_TERMINAL
  VERBATIM
)

P.S. here also I can't agree on wrapping 1st argument -- it's special enough to be left on same line as function. Maybe we need option to make such behavior consistent ? For ones who love 1st argument wrapping and for those who don't. In any case we will have bunch of exceptions from the rule :(

cheshirekow commented 4 years ago

:+1: on USES_TERMINAL. See the discussion in #137 regarding first argument.

cheshirekow commented 4 years ago

Added in v0.6.2.