From: Dan Mick Date: Thu, 6 Aug 2020 02:05:10 +0000 (+0000) Subject: cmake: don't include tags for Python imports, .tox, build/ dirs X-Git-Tag: v16.1.0~1455^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e7e950aa36f462d34a9a073e3cc4db5c671e00ed;p=ceph.git cmake: don't include tags for Python imports, .tox, build/ dirs For things like cephadm, where there is a lot of "from X import Y", the import tags become cumbersome. .tox dirs and python-common/build are just repeats of source files found elsewhere so result in duplicate tags Signed-off-by: Dan Mick --- diff --git a/CMakeLists.txt b/CMakeLists.txt index b4f9c74cb923..88a87df6be16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -675,7 +675,7 @@ add_tags(ctags SRC_DIR src TAG_FILE tags EXCLUDE_OPTS ${CTAG_EXCLUDES} - EXCLUDES "*.js" "*.css") + EXCLUDES "*.js" "*.css" ".tox" "python-common/build") add_custom_target(tags DEPENDS ctags) set(VERSION 15.2.0) diff --git a/cmake/modules/CTags.cmake b/cmake/modules/CTags.cmake index 55b228883116..c3e1b3799b02 100644 --- a/cmake/modules/CTags.cmake +++ b/cmake/modules/CTags.cmake @@ -31,7 +31,7 @@ function(add_tags name) list(APPEND exclude_args --exclude=${exclude}) endforeach() add_custom_target(${name} - COMMAND ${CTAGS_EXECUTABLE} -R --c++-kinds=+p --fields=+iaS --extra=+q ${exclude_args} + COMMAND ${CTAGS_EXECUTABLE} -R --python-kinds=-i --c++-kinds=+p --fields=+iaS --extra=+q ${exclude_args} WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${TAGS_SRC_DIR} COMMENT "Building ctags file ${TAGS_TAG_FILE}" VERBATIM)