File: tags.cmake

package info (click to toggle)
libfyaml 0.9.4-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,416 kB
  • sloc: ansic: 64,719; asm: 8,692; sh: 1,658; makefile: 637; python: 23
file content (21 lines) | stat: -rw-r--r-- 560 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
find_program(CTAGS ctags)

if(CTAGS)
    # Name of the build directory (for exclusion)
    get_filename_component(_build_dir_name "${CMAKE_BINARY_DIR}" NAME)

    add_custom_target(ctags
        COMMAND ${CTAGS}
            -R
            --exclude=${_build_dir_name}
            --exclude=.git
            --exclude=.cache
            --extra=+q
            --c-kinds=+lpx
            --fields=afikmsSzt
            -f "${CMAKE_BINARY_DIR}/tags"
            "${CMAKE_SOURCE_DIR}"
        WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
        VERBATIM
    )
endif()