From 2551b1b06795e9934b56fc2242f34f9bb6880c8c Mon Sep 17 00:00:00 2001
From: Patrick Steinhardt <ps@pks.im>
Date: Fri, 3 Apr 2020 19:53:35 +0200
Subject: [PATCH] cmake: remove support for creating tags

We currently have support for generating tags via ctags as part of our
build system. We aren't really in the place of supporting any tooling
that exists apart from the actual build environment, as doing so adds
additional complexity and maintenance burden to our build instructions.
This is in fact nicely demonstrated by this particular option, as it
hasn't been working anymore since commit e5c9723d0 (cmake: move library
build instructions into subdirectory, 2017-06-30).

As a result, this commit removes support for building CTags
---
 CMakeLists.txt | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 82def8a..5b29f44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -49,7 +49,6 @@ OPTION(THREADSAFE			"Build libgit2 as threadsafe"				 ON)
 OPTION(BUILD_CLAR			"Build Tests using the Clar suite"			 ON)
 OPTION(BUILD_EXAMPLES			"Build library usage example apps"			OFF)
 OPTION(BUILD_FUZZERS			"Build the fuzz targets"				OFF)
-OPTION(TAGS				"Generate tags"						OFF)
 OPTION(PROFILE				"Generate profiling information"			OFF)
 OPTION(ENABLE_TRACE			"Enables tracing support"				ON)
 OPTION(LIBGIT2_FILENAME			"Name of the produced binary"				OFF)
@@ -310,25 +309,6 @@ IF (BUILD_CLAR)
 	ADD_SUBDIRECTORY(tests)
 ENDIF ()
 
-IF (TAGS)
-	FIND_PROGRAM(CTAGS ctags)
-	IF (NOT CTAGS)
-		MESSAGE(FATAL_ERROR "Could not find ctags command")
-	ENDIF ()
-
-	FILE(GLOB_RECURSE SRC_ALL *.[ch])
-
-	ADD_CUSTOM_COMMAND(
-		OUTPUT tags
-		COMMAND ${CTAGS} -a ${SRC_ALL}
-		DEPENDS ${SRC_ALL}
-	)
-	ADD_CUSTOM_TARGET(
-		do_tags ALL
-		DEPENDS tags
-	)
-ENDIF ()
-
 IF (BUILD_EXAMPLES)
 	ADD_SUBDIRECTORY(examples)
 ENDIF ()
--
libgit2 0.26.0