From 3637a87f986cb64ddc1bde3551e29894ab18500b Mon Sep 17 00:00:00 2001 From: Robert Underwood Date: Wed, 3 Jun 2020 12:48:33 -0400 Subject: [PATCH] Don't require ctags unless we ask for it Previously this caused build failures if the user had a bad version of ctags. Don't build with it. --- CMakeLists.txt | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4fd4014..d764a44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,13 +36,16 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) #generate tags for the project if tags exist -find_program(TAGS ctags) -if(TAGS) - add_custom_target(tags ALL - COMMAND ${TAGS} --exclude=${CMAKE_BINARY_DIR} -f ${CMAKE_BINARY_DIR}/tags --c++-kinds=+p --fields=+iaS -R - COMMENT Generating Tag files - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - ) +option(BUILD_CTAGS "enable ctags generation target" OFF) +if(BUILD_CTAGS) + find_program(TAGS ctags) + if(TAGS) + add_custom_target(tags ALL + COMMAND ${TAGS} --exclude=${CMAKE_BINARY_DIR} -f ${CMAKE_BINARY_DIR}/tags --c++-kinds=+p --fields=+iaS -R + COMMENT Generating Tag files + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ) + endif() endif() option(BUILD_SHARED_LIBS "build shared libraries over static libraries" ON) -- 2.24.2 (Apple Git-127)