@@ -96,6 +96,28 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
96
96
endif ()
97
97
endif ()
98
98
99
+ if (PROJECT_IS_TOP_LEVEL)
100
+ # Include dependency settings if the project isn't being included as a subproject.
101
+ # NOTE: We mark the file optional since it's not required if the user happens to have the
102
+ # dependencies installed already.
103
+ include ("${CMAKE_SOURCE_DIR} /../../build/deps/core/cmake-settings/all.cmake"
104
+ OPTIONAL
105
+ RESULT_VARIABLE CLP_DEPS_SETTINGS_FILE_PATH
106
+ )
107
+
108
+ if (NOT CLP_DEPS_SETTINGS_FILE_PATH STREQUAL "NOTFOUND" )
109
+ # Set CMP0144 since our minimum required CMake version is less than 3.27.
110
+ if (POLICY "CMP0144" )
111
+ cmake_policy (SET "CMP0144" "NEW" )
112
+ endif ()
113
+ endif ()
114
+ endif ()
115
+
116
+ find_package (absl REQUIRED)
117
+ if (absl_FOUND)
118
+ message (STATUS "Found absl ${absl_VERSION} " )
119
+ endif ()
120
+
99
121
# Find and setup ANTLR Library
100
122
# We build and link to the static library
101
123
find_package (ANTLR REQUIRED)
@@ -116,6 +138,16 @@ else()
116
138
message (FATAL_ERROR "Could not find ${CLP_LIBS_STRING} libraries for Boost" )
117
139
endif ()
118
140
141
+ find_package (Catch2 REQUIRED)
142
+ if (Catch2_FOUND)
143
+ message (STATUS "Found Catch2 ${Catch2_VERSION} " )
144
+ endif ()
145
+
146
+ find_package (date REQUIRED)
147
+ if (date_FOUND)
148
+ message (STATUS "Found date ${date_VERSION} " )
149
+ endif ()
150
+
119
151
# Find and setup fmt
120
152
# NOTE:
121
153
# - We only try to link to the static library
@@ -127,6 +159,21 @@ else()
127
159
message (FATAL_ERROR "Could not find static libraries for fmt" )
128
160
endif ()
129
161
162
+ find_package (log_surgeon REQUIRED)
163
+ if (log_surgeon_FOUND)
164
+ message (STATUS "Found log_surgeon ${log_surgeon_VERSION} " )
165
+ endif ()
166
+
167
+ find_package (nlohmann_json REQUIRED)
168
+ if (nlohmann_json_FOUND)
169
+ message (STATUS "Found nlohmann_json ${nlohmann_json_VERSION} " )
170
+ endif ()
171
+
172
+ find_package (simdjson REQUIRED)
173
+ if (simdjson_FOUND)
174
+ message (STATUS "Found simdjson ${simdjson_VERSION} " )
175
+ endif ()
176
+
130
177
# Find and setup spdlog
131
178
if (CLP_USE_STATIC_LIBS)
132
179
# NOTE: On some Linux distributions (e.g. Ubuntu), the spdlog package only contains a dynamic
@@ -175,9 +222,6 @@ else ()
175
222
message (FATAL_ERROR "OpenSSL not found" )
176
223
endif ()
177
224
178
- # Add log surgeon
179
- add_subdirectory (submodules/log -surgeon EXCLUDE_FROM_ALL )
180
-
181
225
# Find and setup MariaDBClient library
182
226
if (CLP_USE_STATIC_LIBS)
183
227
# NOTE: We can't statically link to MariaDBClient since it's GPL
@@ -212,21 +256,16 @@ else()
212
256
message (FATAL_ERROR "Could not find msgpack-cxx" )
213
257
endif ()
214
258
215
- # Add abseil-cpp
216
- set (ABSL_PROPAGATE_CXX_STD ON )
217
- add_subdirectory (submodules/abseil-cpp EXCLUDE_FROM_ALL )
218
-
219
- # Add simdjson
220
- add_subdirectory (submodules/simdjson EXCLUDE_FROM_ALL )
221
-
222
259
find_package (Threads REQUIRED)
223
260
224
- # Add yaml-cpp
225
- add_subdirectory (submodules/yaml-cpp EXCLUDE_FROM_ALL )
261
+ find_package (yaml-cpp REQUIRED)
262
+ if (yaml-cpp_FOUND)
263
+ message (STATUS "Found yaml-cpp ${yaml-cpp_VERSION}" )
264
+ endif ()
226
265
227
- # Add ystdlib-cpp
266
+ # Add ystdlib
228
267
set (YSTDLIB_CPP_BUILD_TESTING OFF )
229
- add_subdirectory (submodules /ystdlib-cpp EXCLUDE_FROM_ALL )
268
+ add_subdirectory (" ${CLP_YSTDLIB_SOURCE_DIRECTORY} " " ${CMAKE_BINARY_DIR} /ystdlib" EXCLUDE_FROM_ALL )
230
269
231
270
# Find and setup ZStd Library
232
271
if (CLP_USE_STATIC_LIBS)
@@ -372,6 +411,7 @@ set(SOURCE_FILES_reducer_unitTest
372
411
)
373
412
374
413
set (SOURCE_FILES_unitTest
414
+ "${CLP_SQLITE3_SOURCE_DIRECTORY} /sqlite3.c"
375
415
src/clp/aws/AwsAuthenticationSigner.cpp
376
416
src/clp/aws/AwsAuthenticationSigner.hpp
377
417
src/clp/aws/constants.hpp
@@ -433,6 +473,7 @@ set(SOURCE_FILES_unitTest
433
473
src/clp/ffi/ir_stream/protocol_constants.hpp
434
474
src/clp/ffi/ir_stream/Serializer.cpp
435
475
src/clp/ffi/ir_stream/Serializer.hpp
476
+ src/clp/ffi/ir_stream/search/NewProjectedSchemaTreeNodeCallbackReq.hpp
436
477
src/clp/ffi/ir_stream/utils.cpp
437
478
src/clp/ffi/ir_stream/utils.hpp
438
479
src/clp/ffi/KeyValuePairLogEvent.cpp
@@ -594,9 +635,6 @@ set(SOURCE_FILES_unitTest
594
635
src/clp/version .hpp
595
636
src/clp/WriterInterface.cpp
596
637
src/clp/WriterInterface.hpp
597
- submodules/sqlite3/sqlite3.c
598
- submodules/sqlite3/sqlite3.h
599
- submodules/sqlite3/sqlite3ext.h
600
638
tests/LogSuppressor.hpp
601
639
tests/TestOutputCleaner.hpp
602
640
tests/test -BoundedReader.cpp
@@ -639,30 +677,34 @@ add_executable(unitTest
639
677
)
640
678
target_include_directories (unitTest
641
679
PRIVATE
642
- ${CMAKE_SOURCE_DIR} /submodules
680
+ ${CLP_OUTCOME_INCLUDE_DIRECTORY}
681
+ ${CLP_SQLITE3_INCLUDE_DIRECTORY}
643
682
)
644
683
target_link_libraries (unitTest
645
684
PRIVATE
646
685
absl::flat_hash_map
647
686
Boost::filesystem Boost::iostreams Boost::program_options Boost::regex Boost::url
687
+ Catch2::Catch2
648
688
${CURL_LIBRARIES}
649
689
clp_s::search::ast
650
690
clp_s::TimestampPattern
691
+ date::date
651
692
fmt::fmt
652
693
kql
653
694
log_surgeon::log_surgeon
654
695
LibArchive::LibArchive
655
696
MariaDBClient::MariaDBClient
656
697
${MONGOCXX_TARGET}
657
- simdjson
698
+ nlohmann_json::nlohmann_json
699
+ simdjson::simdjson
658
700
spdlog::spdlog
659
701
sql
660
702
OpenSSL::Crypto
661
703
${sqlite_LIBRARY_DEPENDENCIES}
662
704
${STD_FS_LIBS}
663
705
clp::regex_utils
664
706
clp::string_utils
665
- yaml-cpp::yaml-cpp
707
+ yaml-cpp
666
708
ystdlib::containers
667
709
ystdlib::error_handling
668
710
${LIBLZMA_LIBRARIES}
0 commit comments