Skip to content

Commit f7e5560

Browse files
committed
Unit tests
1 parent 7f6e27a commit f7e5560

3 files changed

Lines changed: 1545 additions & 1540 deletions

File tree

sources/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ set(Boost_USE_STATIC_RUNTIME ON)
106106
add_definitions(-DBOOST_SPIRIT_THREADSAFE)
107107

108108
# define all needed boost libraries
109-
set(BOOST_LIBS
109+
set(BOOST_COMPONENTS
110110
atomic
111111
chrono
112112
date_time
@@ -117,8 +117,8 @@ set(BOOST_LIBS
117117
)
118118

119119
# search boost libs
120-
find_package(Boost 1.89.0 CONFIG REQUIRED COMPONENTS ${BOOST_LIBS})
121-
message("-- Found Boost: ${BOOST_LIBS}")
120+
find_package(Boost 1.89.0 CONFIG REQUIRED COMPONENTS ${BOOST_COMPONENTS})
121+
message("-- Found Boost ${Boost_VERSION_STRING} : ${BOOST_COMPONENTS}")
122122

123123

124124
## Thread Library
@@ -183,6 +183,7 @@ endif()
183183
SET(OPENSSL_USE_STATIC_LIBS TRUE)
184184
SET(OPENSSL_MSVC_STATIC_RT TRUE)
185185
FIND_PACKAGE(OpenSSL REQUIRED)
186+
message("-- Found OpenSSL ${OPENSSL_VERSION}")
186187
#Do not add OPENSSL_SSL_LIBRARY and OPENSSL_CRYPTO_LIBRARY here; it will be later
187188
#if done here, this is too early, and for gcc the libraries appears in bad order regarding Poco for example
188189

@@ -215,7 +216,7 @@ endif(MSVC)
215216
add_definitions(-DPOCO_EXTERNAL_OPENSSL=42) #force an unknown value (empty value do not work correctly)
216217

217218
find_package(Poco CONFIG REQUIRED COMPONENTS ${POCO_COMPONENTS})
218-
message("-- Found Poco: ${POCO_COMPONENTS}")
219+
message("-- Found Poco ${Poco_VERSION} : ${POCO_COMPONENTS}")
219220
set(Poco_TARGETS)
220221
foreach(c IN LISTS POCO_COMPONENTS)
221222
list(APPEND Poco_TARGETS Poco::${c})
@@ -239,7 +240,7 @@ if(PROTOBUF_ROOT)
239240
endif()
240241
set(Protobuf_USE_STATIC_LIBS ON)
241242
find_package(Protobuf MODULE 3.1.0 REQUIRED)
242-
message("-- Found Protobuf: ${Protobuf_VERSION}")
243+
message("-- Found Protobuf ${Protobuf_VERSION}")
243244

244245

245246
###############################################

tests/unit/sources/CMakeLists.txt

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ add_definitions(-DBOOST_TEST_DETECT_FP_EXCEPTIONS)
8080

8181

8282
# define all needed boost libraries
83-
set(BOOST_LIBS
83+
set(BOOST_COMPONENTS
8484
atomic
8585
chrono
8686
date_time
@@ -92,11 +92,11 @@ set(BOOST_LIBS
9292
)
9393

9494
# search boost libs
95-
find_package(Boost 1.89.0 CONFIG REQUIRED COMPONENTS ${BOOST_LIBS})
96-
message("-- Found Boost: ${BOOST_LIBS}")
95+
find_package(Boost 1.89.0 CONFIG REQUIRED COMPONENTS ${BOOST_COMPONENTS})
96+
message("-- Found Boost ${Boost_VERSION_STRING} : ${BOOST_COMPONENTS}")
9797

9898
## thread library (pthread)
99-
FIND_PACKAGE(Threads)
99+
find_package(Threads)
100100

101101
## RT Library
102102
if(UNIX AND NOT APPLE)
@@ -129,12 +129,8 @@ endif()
129129
###############################################
130130
SET(OPENSSL_USE_STATIC_LIBS TRUE)
131131
SET(OPENSSL_MSVC_STATIC_RT TRUE)
132-
FIND_PACKAGE(OpenSSL REQUIRED)
133-
134-
if(NOT ${OPENSSL_FOUND})
135-
message(FATAL_ERROR "Cannot find opensll, all plugins which requires SSL features will not be loaded")
136-
set(OPENSSL_INCLUDE_DIR "")
137-
endif()
132+
find_package(OpenSSL REQUIRED)
133+
message("-- Found OpenSSL ${OPENSSL_VERSION}")
138134
#Do not add OPENSSL_SSL_LIBRARY and OPENSSL_CRYPTO_LIBRARY here; it will be later
139135
#if done here, this is too early, and for gcc the libraries appears in bad order regarding Poco for example
140136

@@ -167,7 +163,7 @@ endif(MSVC)
167163
add_definitions(-DPOCO_EXTERNAL_OPENSSL=42) #force an unknown value (empty value do not work correctly)
168164

169165
find_package(Poco CONFIG REQUIRED COMPONENTS ${POCO_COMPONENTS})
170-
message("-- Found Poco: ${POCO_COMPONENTS}")
166+
message("-- Found Poco ${Poco_VERSION} : ${POCO_COMPONENTS}")
171167
set(Poco_TARGETS)
172168
foreach(c IN LISTS POCO_COMPONENTS)
173169
list(APPEND Poco_TARGETS Poco::${c})

0 commit comments

Comments
 (0)