[cmake] run cmake-format

pull/932/head
Timothy Stack 3 years ago
parent b884f732f2
commit dc0b7ff631

@ -1,8 +1,7 @@
cmake_minimum_required(VERSION 3.2)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
set(CMAKE_BUILD_TYPE Release)
endif()
set(CMAKE_CXX_FLAGS "-Wall -Wextra -Wno-unused-parameter")
@ -10,18 +9,13 @@ set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
include("cmake/HunterGate.cmake")
HunterGate(
URL "https://github.com/cpp-pm/hunter/archive/v0.23.314.tar.gz"
SHA1 "95c47c92f68edb091b5d6d18924baabe02a6962a"
LOCAL
)
huntergate(URL "https://github.com/cpp-pm/hunter/archive/v0.23.314.tar.gz" SHA1
"95c47c92f68edb091b5d6d18924baabe02a6962a" LOCAL)
set(CMAKE_CXX_STANDARD 14)
project(lnav
VERSION 0.10.1)
project(lnav VERSION 0.10.1)
# include(cmake/CodeCoverage.cmake)
# append_coverage_compiler_flags()
# include(cmake/CodeCoverage.cmake) append_coverage_compiler_flags()
include(CTest)
include(GNUInstallDirs)
@ -51,15 +45,15 @@ hunter_add_package(libarchive)
find_package(libarchive CONFIG REQUIRED)
set(lnav_LIBS
ZLIB::zlib
BZip2::bz2
sqlite3::sqlite3
PkgConfig::libpcre
CURL::libcurl
readline::readline
readline::history
PkgConfig::ncursesw
PkgConfig::libarchive)
ZLIB::zlib
BZip2::bz2
sqlite3::sqlite3
PkgConfig::libpcre
CURL::libcurl
readline::readline
readline::history
PkgConfig::ncursesw
PkgConfig::libarchive)
add_subdirectory(src)
add_subdirectory(test)

@ -1,4 +1,3 @@
include(CheckTypeSize)
include(CheckIncludeFile)
include(CheckLibraryExists)
@ -25,495 +24,449 @@ target_link_libraries(bin2c ZLIB::zlib)
add_executable(ptimec ptimec.hh ptimec.c)
set(TIME_FORMATS
"@%@"
"%Y-%m-%d %H:%M:%S"
"%Y-%m-%d %H:%M:%S%z"
"%Y-%m-%d %H:%M:%S %z"
"%Y-%m-%d %H:%M"
"%Y-%m-%dT%H:%M:%S.%f%z"
"%y-%m-%dT%H:%M:%S.%f%z"
"%Y-%m-%dT%H:%M:%SZ"
"%Y-%m-%dT%H:%M:%S%z"
"%Y-%m-%dT%H:%M:%S"
"%Y-%m-%dT%H:%M:%S%z"
"%Y/%m/%d %H:%M:%S"
"%Y/%m/%d %H:%M:%S %z"
"%Y/%m/%d %H:%M:%S%z"
"%Y/%m/%d %H:%M"
"%Y %b %d %a %H:%M:%S.%L"
"%Y %b %d %H:%M:%S.%L"
"%Y %b %d %H:%M:%S"
"%a %b %d %H:%M:%S %Y"
"%a %b %d %H:%M:%S.%f %Y"
"%a %b %d %H:%M:%S %Z %Y"
"%a %b %d %H:%M:%S "
"%a %b %d %H:%M:%S.%L "
"%d/%b/%Y:%H:%M:%S +0000"
"%d/%b/%Y:%H:%M:%S %z"
"%d-%b-%Y %H:%M:%S %z"
"%d-%b-%Y %H:%M:%S %Z"
"%d %b %Y %H:%M:%S"
"%d %b %Y %H:%M:%S.%L"
"%d %b %Y %H:%M:%S,%L"
"%b %d %H:%M:%S"
"%b %d %k:%M:%S"
"%b %d %l:%M:%S"
"%b %e, %Y %l:%M:%S %p"
"%m/%d/%y %H:%M:%S"
"%m/%d/%Y %I:%M:%S:%L %p %Z"
"%m/%d/%Y %I:%M:%S %p %Z"
"%m/%d/%Y %l:%M:%S %p %Z"
"%m/%e/%Y %I:%M:%S %p"
"%m/%e/%Y %l:%M:%S %p"
"%d/%b/%y %H:%M:%S"
"%m%d %H:%M:%S"
"%H:%M:%S"
"%M:%S"
"%m/%d %H:%M:%S"
"%Y-%m-%d"
"%Y-%m"
"%Y/%m/%d"
"%Y/%m"
"%s.%f"
)
"@%@"
"%Y-%m-%d %H:%M:%S"
"%Y-%m-%d %H:%M:%S%z"
"%Y-%m-%d %H:%M:%S %z"
"%Y-%m-%d %H:%M"
"%Y-%m-%dT%H:%M:%S.%f%z"
"%y-%m-%dT%H:%M:%S.%f%z"
"%Y-%m-%dT%H:%M:%SZ"
"%Y-%m-%dT%H:%M:%S%z"
"%Y-%m-%dT%H:%M:%S"
"%Y-%m-%dT%H:%M:%S%z"
"%Y/%m/%d %H:%M:%S"
"%Y/%m/%d %H:%M:%S %z"
"%Y/%m/%d %H:%M:%S%z"
"%Y/%m/%d %H:%M"
"%Y %b %d %a %H:%M:%S.%L"
"%Y %b %d %H:%M:%S.%L"
"%Y %b %d %H:%M:%S"
"%a %b %d %H:%M:%S %Y"
"%a %b %d %H:%M:%S.%f %Y"
"%a %b %d %H:%M:%S %Z %Y"
"%a %b %d %H:%M:%S "
"%a %b %d %H:%M:%S.%L "
"%d/%b/%Y:%H:%M:%S +0000"
"%d/%b/%Y:%H:%M:%S %z"
"%d-%b-%Y %H:%M:%S %z"
"%d-%b-%Y %H:%M:%S %Z"
"%d %b %Y %H:%M:%S"
"%d %b %Y %H:%M:%S.%L"
"%d %b %Y %H:%M:%S,%L"
"%b %d %H:%M:%S"
"%b %d %k:%M:%S"
"%b %d %l:%M:%S"
"%b %e, %Y %l:%M:%S %p"
"%m/%d/%y %H:%M:%S"
"%m/%d/%Y %I:%M:%S:%L %p %Z"
"%m/%d/%Y %I:%M:%S %p %Z"
"%m/%d/%Y %l:%M:%S %p %Z"
"%m/%e/%Y %I:%M:%S %p"
"%m/%e/%Y %l:%M:%S %p"
"%d/%b/%y %H:%M:%S"
"%m%d %H:%M:%S"
"%H:%M:%S"
"%M:%S"
"%m/%d %H:%M:%S"
"%Y-%m-%d"
"%Y-%m"
"%Y/%m/%d"
"%Y/%m"
"%s.%f")
set(GEN_SRCS "")
add_custom_command(
OUTPUT time_fmts.cc
COMMAND ptimec ${TIME_FORMATS} > time_fmts.cc
)
add_custom_command(OUTPUT time_fmts.cc COMMAND ptimec ${TIME_FORMATS} >
time_fmts.cc)
list(APPEND GEN_SRCS time_fmts.cc)
function(bin2c)
cmake_parse_arguments(
BIN2C_
""
"VARNAME"
""
${ARGN}
)
list(TRANSFORM BIN2C_UNPARSED_ARGUMENTS "\\." "-")
add_custom_command(
OUTPUT "${DST_FILE}.h" "${DST_FILE}.cc"
COMMAND bin2c "${DST_FILE}" "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_TO_LINK}"
DEPENDS bin2c "${FILE_TO_LINK}"
)
cmake_parse_arguments(BIN2C_ "" "VARNAME" "" ${ARGN})
list(TRANSFORM BIN2C_UNPARSED_ARGUMENTS "\\." "-")
add_custom_command(
OUTPUT "${DST_FILE}.h" "${DST_FILE}.cc"
COMMAND bin2c "${DST_FILE}" "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_TO_LINK}"
DEPENDS bin2c "${FILE_TO_LINK}")
endfunction(bin2c)
foreach(FILE_TO_LINK
ansi-palette.json
xterm-palette.json
help.txt
init.sql)
string(REPLACE "." "-" DST_FILE "${FILE_TO_LINK}")
add_custom_command(
OUTPUT "${DST_FILE}.h" "${DST_FILE}.cc"
COMMAND bin2c "${DST_FILE}" "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_TO_LINK}"
DEPENDS bin2c "${FILE_TO_LINK}"
)
list(
APPEND GEN_SRCS
"${CMAKE_CURRENT_BINARY_DIR}/${DST_FILE}.h"
"${CMAKE_CURRENT_BINARY_DIR}/${DST_FILE}.cc"
)
foreach(FILE_TO_LINK ansi-palette.json xterm-palette.json help.txt init.sql)
string(REPLACE "." "-" DST_FILE "${FILE_TO_LINK}")
add_custom_command(
OUTPUT "${DST_FILE}.h" "${DST_FILE}.cc"
COMMAND bin2c "${DST_FILE}" "${CMAKE_CURRENT_SOURCE_DIR}/${FILE_TO_LINK}"
DEPENDS bin2c "${FILE_TO_LINK}")
list(APPEND GEN_SRCS "${CMAKE_CURRENT_BINARY_DIR}/${DST_FILE}.h"
"${CMAKE_CURRENT_BINARY_DIR}/${DST_FILE}.cc")
endforeach(FILE_TO_LINK)
set(FORMAT_FILES
formats/access_log.json
formats/alb_log.json
formats/autodeploy_log.json
formats/block_log.json
formats/candlepin_log.json
formats/choose_repo_log.json
formats/cups_log.json
formats/dpkg_log.json
formats/elb_log.json
formats/engine_log.json
formats/error_log.json
formats/fsck_hfs_log.json
formats/glog_log.json
formats/haproxy_log.json
formats/java_log.json
formats/journald_json_log.json
formats/katello_log.json
formats/openam_log.json
formats/openamdb_log.json
formats/openstack_log.json
formats/page_log.json
formats/papertrail_log.json
formats/snaplogic_log.json
formats/sssd_log.json
formats/strace_log.json
formats/sudo_log.json
formats/syslog_log.json
formats/s3_log.json
formats/tcf_log.json
formats/tcsh_history.json
formats/uwsgi_log.json
formats/vdsm_log.json
formats/vmk_log.json
formats/vmw_log.json
formats/xmlrpc_log.json
)
formats/access_log.json
formats/alb_log.json
formats/autodeploy_log.json
formats/block_log.json
formats/candlepin_log.json
formats/choose_repo_log.json
formats/cups_log.json
formats/dpkg_log.json
formats/elb_log.json
formats/engine_log.json
formats/error_log.json
formats/fsck_hfs_log.json
formats/glog_log.json
formats/haproxy_log.json
formats/java_log.json
formats/journald_json_log.json
formats/katello_log.json
formats/openam_log.json
formats/openamdb_log.json
formats/openstack_log.json
formats/page_log.json
formats/papertrail_log.json
formats/snaplogic_log.json
formats/sssd_log.json
formats/strace_log.json
formats/sudo_log.json
formats/syslog_log.json
formats/s3_log.json
formats/tcf_log.json
formats/tcsh_history.json
formats/uwsgi_log.json
formats/vdsm_log.json
formats/vmk_log.json
formats/vmw_log.json
formats/xmlrpc_log.json)
set(FORMAT_FILE_PATHS ${FORMAT_FILES})
list(TRANSFORM FORMAT_FILE_PATHS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/")
add_custom_command(
OUTPUT default-formats.h default-formats.cc
COMMAND bin2c -n lnav_format_json default-formats ${FORMAT_FILE_PATHS}
DEPENDS bin2c ${FORMAT_FILES}
)
OUTPUT default-formats.h default-formats.cc
COMMAND bin2c -n lnav_format_json default-formats ${FORMAT_FILE_PATHS}
DEPENDS bin2c ${FORMAT_FILES})
list(APPEND GEN_SRCS default-formats.h default-formats.cc)
set(CONFIG_FILES
root-config.json
keymaps/de-keymap.json
keymaps/default-keymap.json
keymaps/fr-keymap.json
keymaps/uk-keymap.json
keymaps/us-keymap.json
themes/default-theme.json
themes/grayscale.json
themes/eldar.json
themes/monocai.json
themes/night-owl.json
themes/solarized-dark.json
themes/solarized-light.json
)
root-config.json
keymaps/de-keymap.json
keymaps/default-keymap.json
keymaps/fr-keymap.json
keymaps/uk-keymap.json
keymaps/us-keymap.json
themes/default-theme.json
themes/grayscale.json
themes/eldar.json
themes/monocai.json
themes/night-owl.json
themes/solarized-dark.json
themes/solarized-light.json)
set(CONFIG_FILE_PATHS ${CONFIG_FILES})
list(TRANSFORM CONFIG_FILE_PATHS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/")
add_custom_command(
OUTPUT default-config.h default-config.cc
COMMAND bin2c -n lnav_config_json default-config ${CONFIG_FILE_PATHS}
DEPENDS bin2c ${CONFIG_FILES}
)
OUTPUT default-config.h default-config.cc
COMMAND bin2c -n lnav_config_json default-config ${CONFIG_FILE_PATHS}
DEPENDS bin2c ${CONFIG_FILES})
list(APPEND GEN_SRCS default-config.h default-config.cc)
set(BUILTIN_LNAV_SCRIPTS
scripts/dhclient-summary.lnav
scripts/lnav-pop-view.lnav
scripts/partition-by-boot.lnav
scripts/rename-stdin.lnav
scripts/search-for.lnav)
scripts/dhclient-summary.lnav scripts/lnav-pop-view.lnav
scripts/partition-by-boot.lnav scripts/rename-stdin.lnav
scripts/search-for.lnav)
set(BUILTIN_LNAV_SCRIPT_PATHS ${BUILTIN_LNAV_SCRIPTS})
list(TRANSFORM BUILTIN_LNAV_SCRIPT_PATHS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/")
add_custom_command(
OUTPUT builtin-scripts.h builtin-scripts.cc
COMMAND bin2c -n lnav_scripts builtin-scripts ${BUILTIN_LNAV_SCRIPT_PATHS}
DEPENDS bin2c ${BUILTIN_LNAV_SCRIPTS}
)
OUTPUT builtin-scripts.h builtin-scripts.cc
COMMAND bin2c -n lnav_scripts builtin-scripts ${BUILTIN_LNAV_SCRIPT_PATHS}
DEPENDS bin2c ${BUILTIN_LNAV_SCRIPTS})
list(APPEND GEN_SRCS builtin-scripts.h builtin-scripts.cc)
set(BUILTIN_SH_SCRIPTS
scripts/dhclient-summary.lnav
scripts/lnav-pop-view.lnav
scripts/partition-by-boot.lnav
scripts/search-for.lnav)
set(BUILTIN_SH_SCRIPTS scripts/dhclient-summary.lnav scripts/lnav-pop-view.lnav
scripts/partition-by-boot.lnav scripts/search-for.lnav)
set(BUILTIN_SH_SCRIPT_PATHS ${BUILTIN_SH_SCRIPTS})
list(TRANSFORM BUILTIN_SH_SCRIPT_PATHS PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/")
add_custom_command(
OUTPUT builtin-sh-scripts.h builtin-sh-scripts.cc
COMMAND bin2c -n lnav_sh_scripts builtin-sh-scripts ${BUILTIN_SH_SCRIPT_PATHS}
DEPENDS bin2c ${BUILTIN_SH_SCRIPTS}
)
OUTPUT builtin-sh-scripts.h builtin-sh-scripts.cc
COMMAND bin2c -n lnav_sh_scripts builtin-sh-scripts ${BUILTIN_SH_SCRIPT_PATHS}
DEPENDS bin2c ${BUILTIN_SH_SCRIPTS})
list(APPEND GEN_SRCS builtin-sh-scripts.h builtin-sh-scripts.cc)
add_library(cppfmt STATIC
fmtlib/format.cc
fmtlib/os.cc
fmtlib/fmt/chrono.h
fmtlib/fmt/color.h
fmtlib/fmt/compile.h
fmtlib/fmt/core.h
fmtlib/fmt/format-inl.h
fmtlib/fmt/format.h
fmtlib/fmt/locale.h
fmtlib/fmt/os.h
fmtlib/fmt/ostream.h
fmtlib/fmt/posix.h
fmtlib/fmt/printf.h
fmtlib/fmt/ranges.h
fmtlib/fmt/time.h
)
add_library(diag STATIC
${GEN_SRCS}
config.h
all_logs_vtab.cc
ansi_scrubber.cc
archive_manager.cc
attr_line.cc
bin2c.hh
bookmarks.cc
bottom_status_source.cc
collation-functions.cc
column_namer.cc
command_executor.cc
curl_looper.cc
db_sub_source.cc
elem_to_json.cc
environ_vtab.cc
extension-functions.cc
field_overlay_source.cc
file_collection.cc
file_format.cc
file_vtab.cc
files_sub_source.cc
filter_observer.cc
filter_status_source.cc
filter_sub_source.cc
fs-extension-functions.cc
fstat_vtab.cc
fts_fuzzy_match.cc
grep_proc.cc
help_text.cc
help_text_formatter.cc
highlighter.cc
hist_source.cc
hotkeys.cc
input_dispatcher.cc
json-extension-functions.cc
yajlpp/json_op.cc
yajlpp/json_ptr.cc
line_buffer.cc
listview_curses.cc
lnav_commands.cc
lnav_config.cc
lnav_util.cc
log_accel.cc
log_actions.cc
log_data_helper.cc
log_data_table.cc
log_format.cc
log_format_loader.cc
log_level.cc
log_search_table.cc
logfile.cc
logfile_sub_source.cc
network-extension-functions.cc
data_scanner.cc
data_scanner_re.cc
data_parser.cc
papertrail_proc.cc
ptimec_rt.cc
pretty_printer.cc
pugixml/pugixml.cpp
readline_callbacks.cc
readline_curses.cc
readline_highlighters.cc
readline_possibilities.cc
regexp_vtab.cc
relative_time.cc
session_data.cc
sequence_matcher.cc
shared_buffer.cc
shlex.cc
sqlite-extension-func.cc
statusview_curses.cc
string-extension-functions.cc
sysclip.cc
piper_proc.cc
spectro_source.cc
sql_commands.cc
sql_util.cc
state-extension-functions.cc
styling.cc
string_attr_type.cc
text_format.cc
textfile_highlighters.cc
textfile_sub_source.cc
textview_curses.cc
top_status_source.cc
time-extension-functions.cc
timer.cc
unique_path.cc
unique_path.hh
view_curses.cc
view_helpers.cc
views_vtab.cc
vt52_curses.cc
vtab_module.cc
log_vtab_impl.cc
xml_util.cc
xpath_vtab.cc
xterm_mouse.cc
yajlpp/yajlpp.cc
yajl/yajl.c
yajl/yajl_alloc.c
yajl/yajl_alloc.h
yajl/yajl_buf.c
yajl/yajl_buf.h
yajl/yajl_bytestack.h
yajl/yajl_encode.c
yajl/yajl_encode.h
yajl/yajl_gen.c
yajl/yajl_lex.c
yajl/yajl_lex.h
yajl/yajl_parser.c
yajl/yajl_parser.h
yajl/yajl_tree.c
yajl/yajl_version.c
spookyhash/SpookyV2.cpp
third-party/sqlite/ext/series.c
third-party/sqlite/ext/dbdump.c
all_logs_vtab.hh
archive_manager.hh
archive_manager.cfg.hh
attr_line.hh
auto_fd.hh
auto_mem.hh
big_array.hh
bottom_status_source.hh
bound_tags.hh
byte_array.hh
command_executor.hh
column_namer.hh
curl_looper.hh
doc_status_source.hh
elem_to_json.hh
field_overlay_source.hh
file_collection.hh
file_format.hh
files_sub_source.hh
filter_observer.hh
filter_status_source.hh
filter_sub_source.hh
fstat_vtab.hh
fts_fuzzy_match.hh
grep_highlighter.hh
help_text.hh
help_text_formatter.hh
highlighter.hh
hotkeys.hh
input_dispatcher.hh
k_merge_tree.h
log_actions.hh
log_data_helper.hh
log_data_table.hh
log_format.hh
log_format_ext.hh
log_format_fwd.hh
log_format_impls.cc
log_gutter_source.hh
log_level.hh
log_search_table.hh
logfile.hh
logfile_fwd.hh
logfile_stats.hh
optional.hpp
papertrail_proc.hh
plain_text_source.hh
pretty_printer.hh
preview_status_source.hh
ptimec.hh
pugixml/pugiconfig.hpp
pugixml/pugixml.hpp
readline_callbacks.hh
readline_possibilities.hh
regexp_vtab.hh
relative_time.hh
styling.hh
ring_span.hh
safe/accessmode.h
safe/defaulttypes.h
safe/mutableref.h
safe/safe.h
sequence_sink.hh
shlex.hh
simdutf8check.h
spectro_source.hh
sql_util.hh
strong_int.hh
string_attr_type.hh
sysclip.hh
sysclip.cfg.hh
term_extra.hh
termios_guard.hh
text_format.hh
textfile_highlighters.hh
textfile_sub_source.hh
textview_curses.hh
textview_curses_fwd.hh
time_T.hh
timer.hh
top_status_source.hh
url_loader.hh
view_helpers.hh
views_vtab.hh
vis_line.hh
vtab_module.hh
vtab_module_json.hh
yajlpp/yajlpp.hh
yajlpp/yajlpp_def.hh
xml_util.hh
xpath_vtab.hh
mapbox/recursive_wrapper.hpp
mapbox/variant.hpp
mapbox/variant_io.hpp
mapbox/variant_visitor.hpp
yajl/api/yajl_common.h
yajl/api/yajl_gen.h
yajl/api/yajl_parse.h
yajl/api/yajl_tree.h
ghc/filesystem.hpp
ghc/fs_fwd.hpp
ghc/fs_impl.hpp
ghc/fs_std.hpp
ghc/fs_std_fwd.hpp
ghc/fs_std_impl.hpp
ww898/cp_utf8.hpp
log_level_re.cc
)
add_library(
cppfmt STATIC
fmtlib/format.cc
fmtlib/os.cc
fmtlib/fmt/chrono.h
fmtlib/fmt/color.h
fmtlib/fmt/compile.h
fmtlib/fmt/core.h
fmtlib/fmt/format-inl.h
fmtlib/fmt/format.h
fmtlib/fmt/locale.h
fmtlib/fmt/os.h
fmtlib/fmt/ostream.h
fmtlib/fmt/posix.h
fmtlib/fmt/printf.h
fmtlib/fmt/ranges.h
fmtlib/fmt/time.h)
add_library(
diag STATIC
${GEN_SRCS}
config.h
all_logs_vtab.cc
ansi_scrubber.cc
archive_manager.cc
attr_line.cc
bin2c.hh
bookmarks.cc
bottom_status_source.cc
collation-functions.cc
column_namer.cc
command_executor.cc
curl_looper.cc
db_sub_source.cc
elem_to_json.cc
environ_vtab.cc
extension-functions.cc
field_overlay_source.cc
file_collection.cc
file_format.cc
file_vtab.cc
files_sub_source.cc
filter_observer.cc
filter_status_source.cc
filter_sub_source.cc
fs-extension-functions.cc
fstat_vtab.cc
fts_fuzzy_match.cc
grep_proc.cc
help_text.cc
help_text_formatter.cc
highlighter.cc
hist_source.cc
hotkeys.cc
input_dispatcher.cc
json-extension-functions.cc
yajlpp/json_op.cc
yajlpp/json_ptr.cc
line_buffer.cc
listview_curses.cc
lnav_commands.cc
lnav_config.cc
lnav_util.cc
log_accel.cc
log_actions.cc
log_data_helper.cc
log_data_table.cc
log_format.cc
log_format_loader.cc
log_level.cc
log_search_table.cc
logfile.cc
logfile_sub_source.cc
network-extension-functions.cc
data_scanner.cc
data_scanner_re.cc
data_parser.cc
papertrail_proc.cc
ptimec_rt.cc
pretty_printer.cc
pugixml/pugixml.cpp
readline_callbacks.cc
readline_curses.cc
readline_highlighters.cc
readline_possibilities.cc
regexp_vtab.cc
relative_time.cc
session_data.cc
sequence_matcher.cc
shared_buffer.cc
shlex.cc
sqlite-extension-func.cc
statusview_curses.cc
string-extension-functions.cc
sysclip.cc
piper_proc.cc
spectro_source.cc
sql_commands.cc
sql_util.cc
state-extension-functions.cc
styling.cc
string_attr_type.cc
text_format.cc
textfile_highlighters.cc
textfile_sub_source.cc
textview_curses.cc
top_status_source.cc
time-extension-functions.cc
timer.cc
unique_path.cc
unique_path.hh
view_curses.cc
view_helpers.cc
views_vtab.cc
vt52_curses.cc
vtab_module.cc
log_vtab_impl.cc
xml_util.cc
xpath_vtab.cc
xterm_mouse.cc
yajlpp/yajlpp.cc
yajl/yajl.c
yajl/yajl_alloc.c
yajl/yajl_alloc.h
yajl/yajl_buf.c
yajl/yajl_buf.h
yajl/yajl_bytestack.h
yajl/yajl_encode.c
yajl/yajl_encode.h
yajl/yajl_gen.c
yajl/yajl_lex.c
yajl/yajl_lex.h
yajl/yajl_parser.c
yajl/yajl_parser.h
yajl/yajl_tree.c
yajl/yajl_version.c
spookyhash/SpookyV2.cpp
third-party/sqlite/ext/series.c
third-party/sqlite/ext/dbdump.c
all_logs_vtab.hh
archive_manager.hh
archive_manager.cfg.hh
attr_line.hh
auto_fd.hh
auto_mem.hh
big_array.hh
bottom_status_source.hh
bound_tags.hh
byte_array.hh
command_executor.hh
column_namer.hh
curl_looper.hh
doc_status_source.hh
elem_to_json.hh
field_overlay_source.hh
file_collection.hh
file_format.hh
files_sub_source.hh
filter_observer.hh
filter_status_source.hh
filter_sub_source.hh
fstat_vtab.hh
fts_fuzzy_match.hh
grep_highlighter.hh
help_text.hh
help_text_formatter.hh
highlighter.hh
hotkeys.hh
input_dispatcher.hh
k_merge_tree.h
log_actions.hh
log_data_helper.hh
log_data_table.hh
log_format.hh
log_format_ext.hh
log_format_fwd.hh
log_format_impls.cc
log_gutter_source.hh
log_level.hh
log_search_table.hh
logfile.hh
logfile_fwd.hh
logfile_stats.hh
optional.hpp
papertrail_proc.hh
plain_text_source.hh
pretty_printer.hh
preview_status_source.hh
ptimec.hh
pugixml/pugiconfig.hpp
pugixml/pugixml.hpp
readline_callbacks.hh
readline_possibilities.hh
regexp_vtab.hh
relative_time.hh
styling.hh
ring_span.hh
safe/accessmode.h
safe/defaulttypes.h
safe/mutableref.h
safe/safe.h
sequence_sink.hh
shlex.hh
simdutf8check.h
spectro_source.hh
sql_util.hh
strong_int.hh
string_attr_type.hh
sysclip.hh
sysclip.cfg.hh
term_extra.hh
termios_guard.hh
text_format.hh
textfile_highlighters.hh
textfile_sub_source.hh
textview_curses.hh
textview_curses_fwd.hh
time_T.hh
timer.hh
top_status_source.hh
url_loader.hh
view_helpers.hh
views_vtab.hh
vis_line.hh
vtab_module.hh
vtab_module_json.hh
yajlpp/yajlpp.hh
yajlpp/yajlpp_def.hh
xml_util.hh
xpath_vtab.hh
mapbox/recursive_wrapper.hpp
mapbox/variant.hpp
mapbox/variant_io.hpp
mapbox/variant_visitor.hpp
yajl/api/yajl_common.h
yajl/api/yajl_gen.h
yajl/api/yajl_parse.h
yajl/api/yajl_tree.h
ghc/filesystem.hpp
ghc/fs_fwd.hpp
ghc/fs_impl.hpp
ghc/fs_std.hpp
ghc/fs_std_fwd.hpp
ghc/fs_std_impl.hpp
ww898/cp_utf8.hpp
log_level_re.cc)
set(lnav_SRCS lnav.cc)
target_include_directories(
diag
PUBLIC
.
fmtlib
${CMAKE_CURRENT_BINARY_DIR}
third-party
)
target_link_libraries(diag
base
pcrepp
tailerservice
tailerpp
tailercommon
${lnav_LIBS}
)
target_include_directories(diag PUBLIC . fmtlib ${CMAKE_CURRENT_BINARY_DIR}
third-party)
target_link_libraries(
diag
base
pcrepp
tailerservice
tailerpp
tailercommon
${lnav_LIBS})
target_compile_definitions(diag PRIVATE SQLITE_OMIT_LOAD_EXTENSION)
check_library_exists(util openpty "" HAVE_LIBUTIL)
if(HAVE_LIBUTIL)
target_link_libraries(diag util)
target_link_libraries(diag util)
endif()
add_executable(test_yajlpp yajlpp/test_yajlpp.cc)

@ -1,71 +1,55 @@
add_library(base STATIC
../config.h
auto_pid.cc
date_time_scanner.cc
humanize.cc
humanize.network.cc
humanize.time.cc
intern_string.cc
is_utf8.cc
isc.cc
lnav.gzip.cc
lnav_log.cc
network.tcp.cc
paths.cc
string_util.cc
strnatcmp.c
time_util.cc
auto_pid.hh
date_time_scanner.hh
enum_util.hh
func_util.hh
future_util.hh
humanize.hh
humanize.network.hh
humanize.time.hh
injector.hh
injector.bind.hh
intern_string.hh
is_utf8.hh
isc.hh
lrucache.hpp
math_util.hh
network.tcp.hh
paths.hh
result.h
strnatcmp.h
time_util.hh
)
target_include_directories(
base
PUBLIC
.
..
../fmtlib
../third-party
${CMAKE_CURRENT_BINARY_DIR}/..
)
add_library(
base STATIC
../config.h
auto_pid.cc
date_time_scanner.cc
humanize.cc
humanize.network.cc
humanize.time.cc
intern_string.cc
is_utf8.cc
isc.cc
lnav.gzip.cc
lnav_log.cc
network.tcp.cc
paths.cc
string_util.cc
strnatcmp.c
time_util.cc
auto_pid.hh
date_time_scanner.hh
enum_util.hh
func_util.hh
future_util.hh
humanize.hh
humanize.network.hh
humanize.time.hh
injector.hh
injector.bind.hh
intern_string.hh
is_utf8.hh
isc.hh
lrucache.hpp
math_util.hh
network.tcp.hh
paths.hh
result.h
strnatcmp.h
time_util.hh)
target_include_directories(base PUBLIC . .. ../fmtlib ../third-party
${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(base cppfmt PkgConfig::libpcre)
add_executable(test_base
humanize.file_size.tests.cc
humanize.network.tests.cc
humanize.time.tests.cc
lnav.gzip.tests.cc
string_util.tests.cc
network.tcp.tests.cc
test_base.cc)
target_include_directories(
test_base
PUBLIC
../third-party/doctest-root
)
add_executable(
test_base
humanize.file_size.tests.cc
humanize.network.tests.cc
humanize.time.tests.cc
lnav.gzip.tests.cc
string_util.tests.cc
network.tcp.tests.cc
test_base.cc)
target_include_directories(test_base PUBLIC ../third-party/doctest-root)
target_link_libraries(test_base base pcrepp ZLIB::zlib)
add_test(NAME test_base COMMAND test_base)

@ -1,17 +1,5 @@
add_library(pcrepp STATIC ../config.h pcrepp.hh pcrepp.cc)
add_library(pcrepp STATIC
../config.h
pcrepp.hh
pcrepp.cc
)
target_include_directories(
pcrepp
PUBLIC
.
..
../fmtlib
${CMAKE_CURRENT_BINARY_DIR}/..
)
target_include_directories(pcrepp PUBLIC . .. ../fmtlib
${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(pcrepp PkgConfig::libpcre)

@ -1,18 +1,5 @@
add_library(remote STATIC ../config.h remote.ssh.cc remote.ssh.hh)
add_library(remote STATIC
../config.h
remote.ssh.cc
remote.ssh.hh
)
target_include_directories(
remote
PUBLIC
.
..
../fmtlib
${CMAKE_CURRENT_BINARY_DIR}/..
)
target_include_directories(remote PUBLIC . .. ../fmtlib
${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(remote cppfmt PkgConfig::libpcre)

@ -1,69 +1,24 @@
add_library(tailercommon sha-256.c sha-256.h tailer.c tailer.h)
add_library(
tailercommon
sha-256.c
sha-256.h
tailer.c
tailer.h
)
add_executable(
tailer
tailer.main.c
)
add_executable(tailer tailer.main.c)
target_link_libraries(tailer tailercommon)
add_library(
tailerpp
tailerpp.hh
tailerpp.cc
)
add_library(tailerpp tailerpp.hh tailerpp.cc)
target_link_libraries(tailerpp base)
add_custom_command(
OUTPUT tailerbin.h tailerbin.cc
COMMAND bin2c -n tailer_bin tailerbin tailer
DEPENDS bin2c tailer
)
add_library(
tailerservice
OUTPUT tailerbin.h tailerbin.cc
COMMAND bin2c -n tailer_bin tailerbin tailer
DEPENDS bin2c tailer)
tailer.looper.hh
tailer.looper.cc
tailer.looper.cfg.hh
tailerbin.h
tailerbin.cc
)
target_include_directories(
tailerservice
PUBLIC
${CMAKE_CURRENT_BINARY_DIR})
add_library(tailerservice tailer.looper.hh tailer.looper.cc
tailer.looper.cfg.hh tailerbin.h tailerbin.cc)
target_include_directories(tailerservice PUBLIC ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(tailerservice base)
add_executable(
drive_tailer
drive_tailer.cc
)
add_executable(drive_tailer drive_tailer.cc)
target_include_directories(
drive_tailer
PUBLIC
.
..
../fmtlib
${CMAKE_CURRENT_BINARY_DIR}/..
)
target_link_libraries(drive_tailer
base
tailercommon
tailerpp
ZLIB::zlib
)
target_include_directories(drive_tailer PUBLIC . .. ../fmtlib
${CMAKE_CURRENT_BINARY_DIR}/..)
target_link_libraries(drive_tailer base tailercommon tailerpp ZLIB::zlib)

@ -1,16 +1,10 @@
enable_testing()
include_directories(
.
${CMAKE_SOURCE_DIR}/src
${CMAKE_SOURCE_DIR}/src/fmtlib
${CMAKE_CURRENT_BINARY_DIR}/../src
${CMAKE_CURRENT_BINARY_DIR}
)
add_library(testdummy STATIC
test_stubs.cc)
. ${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/src/fmtlib
${CMAKE_CURRENT_BINARY_DIR}/../src ${CMAKE_CURRENT_BINARY_DIR})
add_library(testdummy STATIC test_stubs.cc)
target_link_libraries(testdummy PkgConfig::libpcre)
add_executable(test_abbrev test_abbrev.cc)
@ -42,10 +36,7 @@ target_link_libraries(test_grep_proc2 diag PkgConfig::libpcre)
add_test(NAME test_grep_proc2 COMMAND test_grep_proc2)
add_executable(test_line_buffer2 test_line_buffer2.cc)
target_link_libraries(test_line_buffer2
diag
BZip2::bz2
ZLIB::zlib)
target_link_libraries(test_line_buffer2 diag BZip2::bz2 ZLIB::zlib)
add_test(NAME test_line_buffer2 COMMAND test_line_buffer2)
add_executable(test_log_accel test_log_accel.cc)

Loading…
Cancel
Save