Skip to content

Commit ad33f42

Browse files
committed
Building a shared library for each module
1 parent 9a65e8f commit ad33f42

File tree

28 files changed

+173
-114
lines changed

28 files changed

+173
-114
lines changed

src/CMakeLists.txt

Lines changed: 0 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -91,61 +91,3 @@ add_subdirectory(www)
9191
add_subdirectory(xrdlog)
9292
add_subdirectory(xrdreq)
9393
add_subdirectory(xrdsvc)
94-
95-
#-----------------------------------------------------------------------------
96-
97-
add_library(qserv_common SHARED)
98-
99-
target_link_libraries(qserv_common PUBLIC
100-
global
101-
memman
102-
proto
103-
mysql
104-
sql
105-
util
106-
)
107-
108-
install(
109-
TARGETS qserv_common
110-
)
111-
112-
#-----------------------------------------------------------------------------
113-
114-
add_library(xrdsvc SHARED)
115-
116-
target_link_libraries(xrdsvc PUBLIC
117-
wbase
118-
wcontrol
119-
wconfig
120-
wdb
121-
wpublish
122-
wsched
123-
qserv_xrdsvc
124-
qserv_common
125-
)
126-
127-
install(
128-
TARGETS xrdsvc
129-
)
130-
131-
#-----------------------------------------------------------------------------
132-
133-
add_library(qserv_czar SHARED)
134-
135-
target_link_libraries(qserv_czar PUBLIC
136-
ccontrol
137-
czar
138-
parser
139-
qana
140-
query
141-
qdisp
142-
qproc
143-
rproc
144-
qserv_css
145-
qserv_meta
146-
xrdreq
147-
)
148-
149-
install(
150-
TARGETS qserv_czar
151-
)

src/cconfig/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
add_library(cconfig OBJECT)
1+
add_library(cconfig SHARED)
22

33
target_sources(cconfig PRIVATE
44
CzarConfig.cc
@@ -12,3 +12,7 @@ target_link_libraries(cconfig PUBLIC
1212
log
1313
XrdSsiLib
1414
)
15+
16+
install(
17+
TARGETS cconfig
18+
)

src/ccontrol/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
add_library(ccontrol OBJECT)
1+
add_library(ccontrol SHARED)
22
add_dependencies(ccontrol proto)
33

44
target_include_directories(ccontrol PRIVATE
@@ -37,6 +37,10 @@ target_link_libraries(ccontrol PUBLIC
3737
XrdCl
3838
)
3939

40+
install(
41+
TARGETS ccontrol
42+
)
43+
4044
FUNCTION(ccontrol_tests)
4145
FOREACH(TEST IN ITEMS ${ARGV})
4246
add_executable(${TEST} ${TEST}.cc)
@@ -48,8 +52,8 @@ FUNCTION(ccontrol_tests)
4852
qana
4953
qdisp
5054
qproc
51-
qserv_css
52-
qserv_meta
55+
css
56+
qmeta
5357
query
5458
rproc
5559
xrdreq

src/css/CMakeLists.txt

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
add_library(qserv_css SHARED)
1+
add_library(css SHARED)
22

3-
target_sources(qserv_css PRIVATE
3+
target_sources(css PRIVATE
44
CssAccess.cc
55
CssConfig.cc
66
DbInterfaceMySql.cc
@@ -9,19 +9,21 @@ target_sources(qserv_css PRIVATE
99
KvInterfaceImplMySql.cc
1010
)
1111

12-
target_link_libraries(qserv_css PUBLIC
13-
qserv_common
12+
target_link_libraries(css PUBLIC
13+
mysql
14+
sql
1415
log
16+
util
1517
)
1618

17-
install(TARGETS qserv_css)
19+
install(TARGETS css)
1820
install(DIRECTORY schema/ DESTINATION ${CMAKE_INSTALL_PREFIX}/qserv/smig/css/schema/)
1921

2022
FUNCTION(css_tests)
2123
FOREACH(TEST IN ITEMS ${ARGV})
2224
add_executable(${TEST} ${TEST}.cc)
2325
target_link_libraries(${TEST} PUBLIC
24-
qserv_css
26+
css
2527
Boost::unit_test_framework
2628
)
2729
add_test(NAME ${TEST} COMMAND ${TEST})

src/czar/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
add_library(czar OBJECT)
1+
add_library(czar SHARED)
22

33
target_sources(czar PRIVATE
44
ChttpModule.cc
@@ -31,6 +31,10 @@ target_link_libraries(czar PUBLIC
3131
boost_program_options
3232
)
3333

34+
install(
35+
TARGETS czar
36+
)
37+
3438
function(CZAR_UTILS)
3539
foreach(UTIL IN ITEMS ${ARGV})
3640
add_executable(${UTIL})
@@ -46,7 +50,7 @@ function(CZAR_UTILS)
4650
qana
4751
qdisp
4852
qproc
49-
qserv_meta
53+
qmeta
5054
query
5155
rproc
5256
sql

src/global/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
add_library(global OBJECT)
1+
add_library(global SHARED)
22

33
target_sources(global PRIVATE
44
DbTable.cc
@@ -12,6 +12,10 @@ target_link_libraries(global PUBLIC
1212
log
1313
)
1414

15+
install(
16+
TARGETS global
17+
)
18+
1519
add_executable(testResourceUnit testResourceUnit.cc)
1620

1721
target_link_libraries(testResourceUnit

src/memman/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
add_library(memman OBJECT)
1+
add_library(memman SHARED)
22

33
target_sources(memman PRIVATE
44
MemFile.cc
@@ -11,3 +11,7 @@ target_sources(memman PRIVATE
1111
target_link_libraries(memman PUBLIC
1212
log
1313
)
14+
15+
install(
16+
TARGETS memman
17+
)

src/mysql/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
add_library(mysql OBJECT)
1+
add_library(mysql SHARED)
22
add_dependencies(mysql proto)
33

44
target_sources(mysql PRIVATE
@@ -15,6 +15,10 @@ target_link_libraries(mysql PUBLIC
1515
mysqlclient_r
1616
)
1717

18+
install(
19+
TARGETS mysql
20+
)
21+
1822
add_executable(testLocalInfile testLocalInfile.cc)
1923

2024
target_link_libraries(testLocalInfile

src/parser/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ antlr_target(QSMySqlParser QSMySqlParser.g4 PARSER LISTENER
88
COMPILE_FLAGS -lib ${CMAKE_CURRENT_BINARY_DIR}
99
)
1010

11-
add_library(parser OBJECT)
11+
add_library(parser SHARED)
1212

1313
target_include_directories(parser PRIVATE
1414
${ANTLR4_INCLUDE_DIR}
@@ -28,3 +28,7 @@ target_link_libraries(parser PUBLIC
2828
log
2929
antlr4-runtime
3030
)
31+
32+
install(
33+
TARGETS parser
34+
)

src/proto/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
add_library(proto OBJECT)
1+
add_library(proto SHARED)
22

33
target_compile_options(proto PRIVATE
44
-Wno-maybe-uninitialized
@@ -19,6 +19,10 @@ target_link_libraries(proto PUBLIC
1919
protobuf
2020
)
2121

22+
install(
23+
TARGETS proto
24+
)
25+
2226
add_executable(testProtocol testProtocol.cc)
2327

2428
target_link_libraries(testProtocol

0 commit comments

Comments
 (0)