Repository navigation
build(core): Add flags that external projects can use to disable any part of the build. #955
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 8 commits
7087cba
139300b
929a6d8
3bdb6f8
53d3e1b
e87511e
5737411
40b2491
040623f
f2eae7e
1400ba5
76c603d
e7a8f1b
d578098
f6682e5
18bf970
adf275c
7e5d308
0c69ee9
7f00ead
20f4152
cb1c6ce
ae0a90b
c5f4caf
4b77022
b76d03a
828843e
064f158
4dca942
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,211 @@ | ||
| # Build Target Options | ||
| option( | ||
| CLP_NO_BUILD_BINARIES | ||
| "Do not build any binaries." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_TESTS | ||
| "Do not build any tests." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_REGEX_UTILS | ||
| "Do not build clp::regex_utils." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_STRING_UTILS | ||
| "Do not build clp::string_utils." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_S_ARCHIVEREADER | ||
| "Do not build clp_s::archive_reader." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_S_ARCHIVEWRITER | ||
| "Do not build clp_s::archive_writer." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_S_CLP_DEPENDENCIES | ||
| "Do not build clp_s::clp_dependencies." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_S_IO | ||
| "Do not build clp_s::io." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_S_JSONCONSTRUCTOR | ||
| "Do not build clp_s::json_constructor." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_S_REDUCER_DEPENDENCIES | ||
| "Do not build clp_s::reducer_dependencies." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_S_SEARCH | ||
| "Do not build clp_s::search." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_S_SEARCH_AST | ||
| "Do not build clp_s::search::ast." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_S_SEARCH_KQL | ||
| "Do not build clp_s::search::kql." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_S_SEARCH_SQL | ||
| "Do not build clp_s::search::sql." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_BUILD_CLP_S_TIMESTAMPPATTERN | ||
| "Do not build clp_s::timestamp_pattern." | ||
| OFF | ||
| ) | ||
|
|
||
| # Dependency Options | ||
| option( | ||
| CLP_NO_NEED_ABSL | ||
| "Do not include abseil in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_ANTLR | ||
| "Do not include ANTLR in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_BOOST | ||
| "Do not include boost in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_CURL | ||
| "Do not include CURL in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_DATE | ||
| "Do not include date in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_FMT | ||
| "Do not include fmt in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_LIBARCHIVE | ||
| "Do not include libarchive in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_LOG_SURGEON | ||
| "Do not include log-surgeon in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_LZMA | ||
| "Do not include lzma in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_MARIADB | ||
| "Do not include mariadb in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_MONGOCXX | ||
| "Do not include mongo-cxx in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_MSGPACKCXX | ||
| "Do not include msgpack-cxx in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_NLOHMANN_JSON | ||
| "Do not include nlohmann_json in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_OPENSSL | ||
| "Do not include openssl in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_SIMDJSON | ||
| "Do not include simdjson in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_SPDLOG | ||
| "Do not include spdlog in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_SQLITE | ||
| "Do not include sqlite in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_YAMLCPP | ||
| "Do not include yaml-cpp in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_YSTDLIB | ||
| "Do not include ystdlib in the build." | ||
| OFF | ||
| ) | ||
|
|
||
| option( | ||
| CLP_NO_NEED_ZSTD | ||
| "Do not include zstd in the build." | ||
| OFF | ||
| ) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -151,32 +151,34 @@ set( | |
| ../../reducer/types.hpp | ||
| ) | ||
|
|
||
| add_executable(clo ${CLO_SOURCES} ${REDUCER_SOURCES}) | ||
| target_compile_features(clo PRIVATE cxx_std_20) | ||
| target_include_directories(clo | ||
| PRIVATE | ||
| "${CLP_SQLITE3_INCLUDE_DIRECTORY}" | ||
| ) | ||
| target_link_libraries(clo | ||
| PRIVATE | ||
| Boost::filesystem Boost::program_options | ||
| date::date | ||
| fmt::fmt | ||
| log_surgeon::log_surgeon | ||
| ${MONGOCXX_TARGET} | ||
| msgpack-cxx | ||
| nlohmann_json::nlohmann_json | ||
| spdlog::spdlog | ||
| ${sqlite_LIBRARY_DEPENDENCIES} | ||
| ${STD_FS_LIBS} | ||
| clp::string_utils | ||
| ystdlib::containers | ||
| ystdlib::error_handling | ||
| ZStd::ZStd | ||
| ) | ||
| # Put the built executable at the root of the build directory | ||
| set_target_properties( | ||
| clo | ||
| PROPERTIES | ||
| RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}" | ||
| ) | ||
| if(NOT CLP_NO_BUILD_BINARIES) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to control each individual binary?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah it could be worthwhile. I think it doesn't matter for the immediate use-case (exposing enough options so that external projects can pull in individual libraries without needing to pull in all of our targets and dependencies), but it could be useful e.g. to create more targeted installs of clp. |
||
| add_executable(clo ${CLO_SOURCES} ${REDUCER_SOURCES}) | ||
| target_compile_features(clo PRIVATE cxx_std_20) | ||
| target_include_directories(clo | ||
| PRIVATE | ||
| "${CLP_SQLITE3_INCLUDE_DIRECTORY}" | ||
| ) | ||
| target_link_libraries(clo | ||
| PRIVATE | ||
| Boost::filesystem Boost::program_options | ||
| date::date | ||
| fmt::fmt | ||
| log_surgeon::log_surgeon | ||
| ${MONGOCXX_TARGET} | ||
| msgpack-cxx | ||
| nlohmann_json::nlohmann_json | ||
| spdlog::spdlog | ||
| ${sqlite_LIBRARY_DEPENDENCIES} | ||
| ${STD_FS_LIBS} | ||
| clp::string_utils | ||
| ystdlib::containers | ||
| ystdlib::error_handling | ||
| ZStd::ZStd | ||
| ) | ||
| # Put the built executable at the root of the build directory | ||
| set_target_properties( | ||
| clo | ||
| PROPERTIES | ||
| RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}" | ||
| ) | ||
| endif() | ||
Uh oh!
There was an error while loading. Please reload this page.