Commit ca1141d3 authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #4871 speed up tag generation for cscope and idutils


git-svn-id: file:///svn/toku/tokudb@46022 c7de825b-a66e-492c-adef-691d508d4ae1
parent e6fbdbdf
......@@ -63,11 +63,15 @@ option(USE_CSCOPE "Build the cscope database." ON)
if (USE_CSCOPE)
find_program(CSCOPE "cscope")
if (NOT CSCOPE MATCHES NOTFOUND)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cscope.files" "")
foreach(file ${all_srcs} ${all_hdrs})
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/cscope.files" "${file}\n")
endforeach(file)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/cscope.out"
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/cscope.in.out"
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/cscope.po.out"
COMMAND ${CSCOPE} -b -q -R
COMMAND ${CSCOPE} -b -q -R -i"${CMAKE_CURRENT_BINARY_DIR}/cscope.files" -I"${CMAKE_CURRENT_SOURCE_DIR}" -I"${CMAKE_CURRENT_SOURCE_DIR}/include" -I"${CMAKE_CURRENT_SOURCE_DIR}/toku_include" -I"${CMAKE_CURRENT_SOURCE_DIR}/portability" -I"${CMAKE_CURRENT_SOURCE_DIR}/portability/tests" -I"${CMAKE_CURRENT_SOURCE_DIR}/ft" -I"${CMAKE_CURRENT_SOURCE_DIR}/ft/tests" -I"${CMAKE_CURRENT_SOURCE_DIR}/src" -I"${CMAKE_CURRENT_SOURCE_DIR}/src/range_tree" -I"${CMAKE_CURRENT_SOURCE_DIR}/src/range_tree/tests" -I"${CMAKE_CURRENT_SOURCE_DIR}/src/lock_tree" -I"${CMAKE_CURRENT_SOURCE_DIR}/src/lock_tree/tests" -I"${CMAKE_CURRENT_SOURCE_DIR}/src/tests" -I"${CMAKE_CURRENT_SOURCE_DIR}/utils" -I"${CMAKE_CURRENT_SOURCE_DIR}/db-benchmark-test" -I"${CMAKE_CURRENT_BINARY_DIR}" -I"${CMAKE_CURRENT_BINARY_DIR}/toku_include" -I"${CMAKE_CURRENT_BINARY_DIR}/buildheader"
DEPENDS ${all_srcs} ${all_hdrs} install_tdb_h generate_config_h generate_log_code
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
add_custom_target(build_cscope.out ALL DEPENDS
......@@ -80,15 +84,11 @@ endif ()
option(USE_GTAGS "Build the gtags database." ON)
if (USE_GTAGS)
find_program(GTAGS "gtags")
find_program(MKID "mkid")
if (NOT GTAGS MATCHES NOTFOUND)
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/gtags.files" "")
foreach(file ${all_srcs} ${all_hdrs})
file(APPEND "${CMAKE_CURRENT_BINARY_DIR}/gtags.files" "${file}\n")
endforeach(file)
if (NOT MKID MATCHES NOTFOUND)
set(idutils_option "-I")
endif ()
add_custom_command(
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/GTAGS"
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/GRTAGS"
......@@ -104,3 +104,17 @@ if (USE_GTAGS)
"${CMAKE_CURRENT_SOURCE_DIR}/GSYMS")
endif ()
endif ()
option(USE_MKID "Build the idutils database." ON)
if (USE_MKID)
find_program(MKID "mkid")
if (NOT MKID MATCHES NOTFOUND)
add_custom_command(
OUTPUT "${CMAKE_CURRENT_SOURCE_DIR}/ID"
COMMAND ${MKID} ${all_srcs} ${all_hdrs}
DEPENDS ${all_srcs} ${all_hdrs} install_tdb_h generate_config_h generate_log_code
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
add_custom_target(build_MKID ALL DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/ID")
endif ()
endif ()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment