Enable beast separate compilation
This commit enables separate compilation for asio and beast. Details on
how this option works are here:
https://www.boost.org/doc/libs/1_77_0/doc/html/boost_asio/using.html
This allows separating out the build of the boost components from the
rest of the components, which should decrease our intermediate build
times in the future as we start breaking things up better.
Tested:
Code builds.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I1614bb4ccddebcf1d4858112a25a870378497ecc
diff --git a/meson.build b/meson.build
index 29308f6..9618203 100644
--- a/meson.build
+++ b/meson.build
@@ -259,6 +259,8 @@
'-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT',
'-DBOOST_ASIO_DISABLE_THREADS',
'-DBOOST_BEAST_USE_STD_STRING_VIEW',
+ '-DBOOST_BEAST_SEPARATE_COMPILATION',
+ '-DBOOST_ASIO_SEPARATE_COMPILATION',
'-DBOOST_ERROR_CODE_HEADER_ONLY',
'-DBOOST_SYSTEM_NO_DEPRECATED',
'-DBOOST_ASIO_NO_DEPRECATED',
@@ -348,7 +350,10 @@
'src/webserver_main.cpp',
'redfish-core/src/error_messages.cpp',
'redfish-core/src/utils/json_utils.cpp',
- 'src/boost_url.cpp'
+ 'src/boost_url.cpp',
+ 'src/boost_beast.cpp',
+ 'src/boost_asio.cpp',
+ 'src/boost_asio_ssl.cpp',
]
srcfiles_unittest = [
@@ -423,7 +428,10 @@
testname = src_test.split('/')[-1].split('.')[0]
test(testname,executable(testname,
[src_test,
- 'src/boost_url.cpp'],
+ 'src/boost_url.cpp',
+ 'src/boost_beast.cpp',
+ 'src/boost_asio.cpp',
+ 'src/boost_asio_ssl.cpp',],
include_directories : incdir,
install_dir: bindir,
dependencies: [