linting_target.cmake 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. find_package(ClangTools)
  2. add_custom_target(clang-tidy ${CLANG_TIDY_PROGRAM}
  3. ${lib_sources}
  4. -p=compile_commands.json
  5. --
  6. -I${PROJECT_SOURCE_DIR}/include
  7. -I${PROJECT_SOURCE_DIR}/plugins
  8. -I${PROJECT_SOURCE_DIR}/deps
  9. -I${PROJECT_SOURCE_DIR}/src
  10. -I${PROJECT_SOURCE_DIR}/src/server
  11. -I${PROJECT_SOURCE_DIR}/src/client
  12. -I${PROJECT_BINARY_DIR}/src_generated
  13. DEPENDS ${lib_sources}
  14. COMMENT "Run clang-tidy on the library")
  15. add_dependencies(clang-tidy open62541)
  16. add_custom_target(cpplint cpplint
  17. ${lib_sources}
  18. ${internal_headers}
  19. ${default_plugin_headers}
  20. ${default_plugin_sources}
  21. ${ua_architecture_headers}
  22. ${ua_architecture_sources}
  23. DEPENDS ${lib_sources}
  24. ${internal_headers}
  25. ${default_plugin_headers}
  26. ${default_plugin_sources}
  27. ${ua_architecture_headers}
  28. ${ua_architecture_sources}
  29. COMMENT "Run cpplint code style checker on the library")