SHARE
TWEET

Untitled

a guest Nov 15th, 2017 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # clang-format
  2. find_package(ClangFormat)
  3. if(CLANG_FORMAT_BIN)
  4.     if(CLANG_FORMAT_VERSION VERSION_GREATER "3.8")
  5.         file(GLOB_RECURSE tfs_ALL_FILES *.cpp *.h)
  6.         add_custom_target(
  7.             clangformat
  8.             COMMAND ${CLANG_FORMAT_BIN} -i -style=file ${tfs_ALL_FILES}
  9.         )
  10.         message(STATUS "Found clang-format ${CLANG_FORMAT_VERSION}")
  11.     else()
  12.         message(WARNING "Clang-format 3.9 or greater is required, found ${CLANG_FORMAT_VERSION}")
  13.     endif()
  14. else()
  15.     message(WARNING "Could NOT find clang-format")
  16. endif()
RAW Paste Data
Top