Skip to content

Commit d3fea46

Browse files
committed
added explicit boost dependency, used in one header file
1 parent f661282 commit d3fea46

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

CMakeLists.txt

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ externalproject_add (Common-standalone
6565
)
6666
externalproject_get_property(Common-standalone source_dir)
6767
set(COMMON_STANDALONE_SRC_DIR ${source_dir})
68-
set(COMMON_STANDALONE_INCLUDE_DIR ${COMMON_STANDALONE_SRC_DIR}/include)
68+
set(COMMON_STANDALONE_INCLUDE_DIRS ${COMMON_STANDALONE_SRC_DIR}/include ${Boost_INCLUDE_DIRS})
6969
foreach (modul Configuration Daemon LineBuffer SimpleLog Thread Timer)
7070
add_library(
7171
objCommon${modul} OBJECT
7272
${COMMON_STANDALONE_SRC_DIR}/src/${modul}.cxx
7373
)
7474
set_source_files_properties(${COMMON_STANDALONE_SRC_DIR}/src/${modul}.cxx PROPERTIES GENERATED TRUE)
7575
target_include_directories(objCommon${modul}
76-
PRIVATE ${COMMON_STANDALONE_INCLUDE_DIR}
76+
PRIVATE ${COMMON_STANDALONE_INCLUDE_DIRS}
7777
)
7878
add_dependencies(objCommon${modul} Common-standalone)
7979
endforeach (modul)
@@ -83,7 +83,7 @@ endforeach (modul)
8383
# define include dirs
8484
#get_target_property(COMMON_INCLUDE_DIRS AliceO2::Common INTERFACE_INCLUDE_DIRECTORIES)
8585
if(NOT COMMON_INCLUDE_DIRS)
86-
set(COMMON_INCLUDE_DIRS ${COMMON_STANDALONE_INCLUDE_DIR})
86+
set(COMMON_INCLUDE_DIRS ${COMMON_STANDALONE_INCLUDE_DIRS})
8787
endif()
8888
set(INFOLOGGER_INCLUDE_DIRS_PUBLIC include)
8989
set(INFOLOGGER_INCLUDE_DIRS_PRIVATE ${COMMON_INCLUDE_DIRS})
@@ -105,8 +105,9 @@ add_library (objInfoLoggerClient OBJECT
105105
src/simplelog.cxx
106106
)
107107
target_include_directories(objInfoLoggerClient
108-
PRIVATE ${INFOLOGGER_INCLUDE_DIRS}
108+
PRIVATE ${INFOLOGGER_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
109109
)
110+
add_dependencies(objInfoLoggerClient Common-standalone)
110111

111112
# list of object files for the library
112113
set(INFOLOGGER_LIB_OBJECTS
@@ -131,6 +132,7 @@ target_include_directories(InfoLogger
131132
target_link_libraries(InfoLogger
132133
PUBLIC
133134
# AliceO2::Common
135+
Boost::boost
134136
)
135137
install(TARGETS InfoLogger
136138
EXPORT InfoLoggerTargets
@@ -168,7 +170,7 @@ add_library (objInfoLoggerTransport OBJECT
168170
target_include_directories(objInfoLoggerTransport
169171
PRIVATE ${INFOLOGGER_INCLUDE_DIRS}
170172
)
171-
173+
add_dependencies(objInfoLoggerTransport Common-standalone)
172174

173175
# static library
174176
add_library (libInfoLogger-static STATIC
@@ -197,7 +199,7 @@ target_link_libraries(
197199
target_include_directories(
198200
log
199201
PRIVATE
200-
${COMMON_STANDALONE_INCLUDE_DIR}
202+
${COMMON_STANDALONE_INCLUDE_DIRS}
201203
)
202204

203205

@@ -217,7 +219,7 @@ target_link_libraries(
217219
target_include_directories(
218220
infoLoggerD
219221
PRIVATE
220-
${COMMON_STANDALONE_INCLUDE_DIR}
222+
${COMMON_STANDALONE_INCLUDE_DIRS}
221223
)
222224

223225

@@ -245,7 +247,7 @@ target_include_directories(
245247
infoLoggerServer
246248
PRIVATE
247249
${INFOLOGGER_INCLUDE_DIRS_PUBLIC}
248-
${COMMON_STANDALONE_INCLUDE_DIR}
250+
${COMMON_STANDALONE_INCLUDE_DIRS}
249251
${MYSQL_INCLUDE_DIRS}
250252
)
251253
target_link_libraries(
@@ -265,7 +267,7 @@ add_executable(
265267
target_include_directories(
266268
infoLoggerAdminDB
267269
PRIVATE
268-
${COMMON_STANDALONE_INCLUDE_DIR}
270+
${COMMON_STANDALONE_INCLUDE_DIRS}
269271
${MYSQL_INCLUDE_DIRS}
270272
)
271273
target_link_libraries(
@@ -347,7 +349,7 @@ foreach (f ${TEST_SRCS})
347349
message ("${exe}")
348350
add_executable(${exe} ${f} ${INFOLOGGER_LIB_OBJECTS} $<TARGET_OBJECTS:objCommonTimer>)
349351
target_link_libraries(${exe} InfoLogger)
350-
target_include_directories(${exe} PRIVATE ${COMMON_STANDALONE_INCLUDE_DIR})
352+
target_include_directories(${exe} PRIVATE ${COMMON_STANDALONE_INCLUDE_DIRS})
351353
endforeach()
352354

353355

0 commit comments

Comments
 (0)