From d1dd2d11c4207b8e75931b9c575ea51273185b4b Mon Sep 17 00:00:00 2001 From: Konstantin Osipov Date: Fri, 14 May 2010 18:42:10 +0400 Subject: [PATCH] Committing on behalf of Valdislav Vaintroub (reviewed and approved): 3161 Vladislav Vaintroub 2010-04-29 Bug#53196 : CMake builds don't support 'make tags' and 'make ctags' targets. - Added tags and ctags targets CMakeLists.txt: Add tags and ctags targets. cmake/Makefile.am: Add a cmake file to build tags. cmake/tags.cmake: Build tags and ctags. --- CMakeLists.txt | 1 + cmake/Makefile.am | 1 + cmake/tags.cmake | 26 ++++++++++++++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 cmake/tags.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index d20939f33ac..0b0beea6f42 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -259,6 +259,7 @@ IF(NOT WITHOUT_SERVER) ENDIF() INCLUDE(cmake/abi_check.cmake) +INCLUDE(cmake/tags.cmake) CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/my_config.h) CONFIGURE_FILE(config.h.cmake ${CMAKE_BINARY_DIR}/include/config.h) diff --git a/cmake/Makefile.am b/cmake/Makefile.am index 6fe1a9556be..af3ec4f980d 100644 --- a/cmake/Makefile.am +++ b/cmake/Makefile.am @@ -24,6 +24,7 @@ EXTRA_DIST = \ dtrace_prelink.cmake \ versioninfo.rc.in \ mysql_add_executable.cmake \ + tags.cmake \ install_layout.cmake \ build_configurations/mysql_release.cmake \ os/Windows.cmake \ diff --git a/cmake/tags.cmake b/cmake/tags.cmake new file mode 100644 index 00000000000..07c1411a1d6 --- /dev/null +++ b/cmake/tags.cmake @@ -0,0 +1,26 @@ +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; version 2 of the License. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +# Generate tag files +IF(UNIX) + ADD_CUSTOM_TARGET (tags + COMMAND support-files/build-tags + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ) + ADD_CUSTOM_TARGET (ctags + COMMAND ctags -R -f CTAGS + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + ) +ENDIF()