From 42ad221d9e6db5cf5b34e603419302a077203fb0 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Tue, 21 Apr 2015 22:24:49 +0000 Subject: [PATCH] Add ctags and etags targets to CMake git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5265 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- .gitignore | 1 + CMakeLists.txt | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..bea575523 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +TAGS diff --git a/CMakeLists.txt b/CMakeLists.txt index 7500a9e23..1ec368442 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -505,6 +505,13 @@ if (APPLE) endif (APPLE) +# +# find some useful tools +# +find_program(CTAGS ctags) +find_program(ETAGS etags) + + # # C & C++ setup # @@ -727,6 +734,17 @@ elseif (CMAKE_HOST_WIN32) add_definitions (-DWIN32) endif () +# +# source navigation +# +set (sources + ${CMAKE_SOURCE_DIR}/* + ${CMAKE_SOURCE_DIR}/logbook/* + ${CMAKE_SOURCE_DIR}/lib/* + ) +add_custom_target (ctags COMMAND ${CTAGS} -o ${CMAKE_SOURCE_DIR}/tags -R ${sources}) +add_custom_target (etags COMMAND ${ETAGS} -o ${CMAKE_SOURCE_DIR}/TAGS -R ${sources}) + # embedded resources function (add_resources resources path)