File: CheckIncludeStyle.cmake

package info (click to toggle)
seastar 25.05.0-1
  • links: PTS
  • area: main
  • in suites: sid
  • size: 7,256 kB
  • sloc: cpp: 89,250; python: 5,066; ansic: 3,452; sh: 1,272; xml: 177; makefile: 9
file content (16 lines) | stat: -rw-r--r-- 749 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# seastar_check_include_style() enforces that all source and header files under
# specified directories include the headers with predefined list of prefixes
# with angle brackets instead of quotes.

find_package (Python3 COMPONENTS Interpreter)

function (seastar_check_include_style target library)
  get_target_property (sources ${library} SOURCES)
  set (check-target "${target}-${library}")
  add_custom_target("${check-target}"
    COMMAND Python3::Interpreter ${CMAKE_CURRENT_LIST_DIR}/cmake/check-seastar-include-style.py ${sources}
    WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
    COMMENT "Checking include directive styles for ${library} source files"
    USES_TERMINAL)
  add_dependencies (${target} ${check-target})
endfunction ()