]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: don't include tags for Python imports, .tox, build/ dirs 36528/head
authorDan Mick <dmick@redhat.com>
Thu, 6 Aug 2020 02:05:10 +0000 (02:05 +0000)
committerDan Mick <dmick@redhat.com>
Mon, 10 Aug 2020 22:53:03 +0000 (22:53 +0000)
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 <dmick@redhat.com>
CMakeLists.txt
cmake/modules/CTags.cmake

index b4f9c74cb9231f4df56fb3fb3d5651f8ed189b7e..88a87df6be163b10a92959a6e7b0ffa8d723ca77 100644 (file)
@@ -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)
index 55b2288831165a84c79930678880afda86dab4a1..c3e1b3799b02451e07ac8198c56808d442bb2814 100644 (file)
@@ -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)