Skip to content

Commit 9c2f176

Browse files
committed
support ctags
1 parent d430115 commit 9c2f176

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,17 @@ target_link_libraries(meshFields INTERFACE Cabana::Core)
3434
target_link_libraries(meshFields INTERFACE Kokkos::kokkoskernels)
3535
target_compile_definitions(meshFields INTERFACE ENABLE_CABANA)
3636

37+
#support ctags
38+
option(MeshFields_USE_CTAGS "Generate Ctags" OFF)
39+
if(MeshFields_USE_CTAGS)
40+
#from: https://stackoverflow.com/a/9842046
41+
set_source_files_properties(tags PROPERTIES GENERATED true)
42+
add_custom_target(tags
43+
COMMAND ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .
44+
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})
45+
add_dependencies(meshFields tags)
46+
endif()
47+
3748
#Settings options for testing
3849
enable_testing()
3950
include(CTest)

0 commit comments

Comments
 (0)