Skip to content

Commit 94f42d3

Browse files
committed
fdsdump: split source codes to common and lister components
1 parent 28a549e commit 94f42d3

32 files changed

+64
-37
lines changed
Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,15 @@
1+
include_directories("${CMAKE_CURRENT_SOURCE_DIR}")
2+
3+
# Subdirectories with components
4+
add_subdirectory(common)
5+
add_subdirectory(lister)
6+
17
add_executable(fdsdump
2-
common.cpp
38
main.cpp
4-
printer.cpp
5-
jsonPrinter.cpp
6-
jsonRawPrinter.cpp
7-
tablePrinter.cpp
8-
flowProvider.cpp
9-
filelist.cpp
10-
field.cpp
11-
fieldView.cpp
129
options.cpp
13-
ipaddr.cpp
14-
storageRecord.cpp
15-
storageSorter.cpp
16-
storageSorted.cpp)
10+
$<TARGET_OBJECTS:common_obj>
11+
$<TARGET_OBJECTS:lister_obj>
12+
)
1713

1814
target_include_directories(fdsdump
1915
PUBLIC
@@ -27,4 +23,3 @@ target_link_libraries(fdsdump
2723
install(
2824
TARGETS fdsdump
2925
DESTINATION bin)
30-
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Create a common "object" library
2+
set(COMMON_SRC
3+
common.cpp
4+
field.cpp
5+
fieldView.cpp
6+
filelist.cpp
7+
flowProvider.cpp
8+
ipaddr.cpp
9+
)
10+
11+
add_library(common_obj OBJECT ${COMMON_SRC})
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <string>
66
#include <vector>
77

8-
#include "libfds.h"
8+
#include <libfds.h>
99

1010
using unique_file = std::unique_ptr<fds_file_t, decltype(&fds_file_close)>;
1111
using unique_iemgr = std::unique_ptr<fds_iemgr_t, decltype(&fds_iemgr_destroy)>;
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)