Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: Add simple recursive ctags target for Ceph source only #14334

Merged
merged 1 commit into from Apr 7, 2017

Conversation

Projects
None yet
4 participants
@tchaikov
Copy link
Contributor

tchaikov commented Apr 5, 2017

Excludes submodules and random JavaScript.

Signed-off-by: Dan Mick dan.mick@redhat.com
Signed-off-by: Kefu Chai kchai@redhat.com

@tchaikov

This comment has been minimized.

Copy link
Contributor Author

tchaikov commented Apr 5, 2017

i don't use ctags, but tested using vim.

@tchaikov tchaikov force-pushed the tchaikov:wip-cmake-ctags branch from b980c47 to 0340b5f Apr 5, 2017

@tchaikov tchaikov requested a review from dang Apr 5, 2017

@tchaikov tchaikov force-pushed the tchaikov:wip-cmake-ctags branch 13 times, most recently from 6256801 to 5a7309d Apr 5, 2017

OUTPUT_STRIP_TRAILING_WHITESPACE)
string(REPLACE "\n" " " submodules ${submodules})
string(REPLACE "${src_dir}/" "--exclude=" excludes ${submodules})
separate_arguments(excludes UNIX_COMMAND ${excludes})

This comment has been minimized.

Copy link
@dmick

dmick Apr 6, 2017

Member

I agree this is probably minimal, but it's extremely confusing even if you're aware of cmake's Lists and automagic shell-metacharacter quoting that includes spaces...so let's add a comment like this above it:

  # cmake will quote any embedded spaces when expanding ${excludes}
  # in the command below, so, turn ${excludes} into a cmake List (separated
  # by semicolons) to let the expansion below simply replace them with spaces
  # again.
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/${src_dir}
COMMENT "Building ctags file ${tag_file} (no submodules)"
VERBATIM)
set_source_files_properties(${CMAKE_SOURCE_DIR}/${tag_file} PROPERTIES

This comment has been minimized.

Copy link
@dmick

dmick Apr 6, 2017

Member

...and let's also add the 'tags' target depending on 'ctags'

cmake: Add simple recursive ctags target for Ceph source only
Excludes submodules and random JavaScript.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>

@tchaikov tchaikov force-pushed the tchaikov:wip-cmake-ctags branch from 5a7309d to 3681683 Apr 6, 2017

@tchaikov

This comment has been minimized.

Copy link
Contributor Author

tchaikov commented Apr 6, 2017

@dmick comments addressed and fix repushed.

@dang

dang approved these changes Apr 6, 2017

@cbodley

This comment has been minimized.

Copy link
Contributor

cbodley commented Apr 6, 2017

just a general comment, but i do find it useful to have tags for headers in submodules (my current ~/.ctags only excludes boost). i guess i can use this feature to make ctags, then --append some submodules manually

@dmick

This comment has been minimized.

Copy link
Member

dmick commented Apr 6, 2017

@cbodley I certainly have no compunction with parameterizing this, perhaps based on an env var, or perhaps a new target ctags-sub or something (as a followon)

@dmick dmick merged commit 57b4502 into ceph:master Apr 7, 2017

3 checks passed

Signed-off-by all commits in this PR are signed
Details
Unmodifed Submodules submodules for project are unmodified
Details
default Build finished.
Details
@dmick

This comment has been minimized.

Copy link
Member

dmick commented Apr 7, 2017

Test looks good today. Thanks @tchaikov

@tchaikov tchaikov deleted the tchaikov:wip-cmake-ctags branch Apr 7, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.