blob: 8fd6a50dcfc965e9accac11361eee6f21c0ec2f2 [file] [log] [blame]
Ed Tanousf2caadc2024-01-02 18:34:36 -08001project(
2 'bmcweb',
3 'cpp',
4 version: '1.0',
Ed Tanous8dc3ddf2024-06-25 13:00:16 -07005 meson_version: '>=1.3.0',
Ed Tanousf2caadc2024-01-02 18:34:36 -08006 default_options: [
7 'b_lto_mode=default',
8 'b_lto_threads=0',
9 'b_lto=true',
10 'b_ndebug=if-release',
11 'buildtype=debugoptimized',
12 'cpp_rtti=false',
Patrick Williams921cfcd2023-08-23 06:31:07 -050013 'cpp_std=c++23',
Ed Tanousf2caadc2024-01-02 18:34:36 -080014 'warning_level=3',
15 'werror=true',
16 ],
17)
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053018
19# Project related links
20
21project_pretty_name = 'bmcweb'
22project_url = 'https://github.com/openbmc/' + project_pretty_name
23project_issues_url = project_url + '/issues/new'
Ed Tanousf2caadc2024-01-02 18:34:36 -080024summary('Issues', project_issues_url, section: 'Report Issues')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053025
26# Validate the c++ Standard
27
Patrick Williams921cfcd2023-08-23 06:31:07 -050028if get_option('cpp_std') != 'c++23'
29 error('This project requires c++23 support')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053030endif
31
32# Get compiler and default build type
33
34cxx = meson.get_compiler('cpp')
35build = get_option('buildtype')
36optimization = get_option('optimization')
Ed Tanousf2caadc2024-01-02 18:34:36 -080037summary('Build Type', build, section: 'Build Info')
38summary('Optimization', optimization, section: 'Build Info')
Ed Tanous5e34b672021-02-05 14:21:27 -080039
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053040# remove debug information for minsize buildtype
Ed Tanousf2caadc2024-01-02 18:34:36 -080041if (get_option('buildtype') == 'minsize')
Ed Tanous92e26be2024-08-21 13:39:14 -070042 add_project_arguments(
43 ['-fdata-sections', '-ffunction-sections'],
44 language: 'cpp',
45 )
Ed Tanousf2caadc2024-01-02 18:34:36 -080046 add_project_arguments('-DNDEBUG', language: 'cpp')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053047endif
48
Ed Tanousf2caadc2024-01-02 18:34:36 -080049if (get_option('dns-resolver') == 'systemd-dbus')
50 add_project_arguments('-DBMCWEB_DBUS_DNS_RESOLVER', language: 'cpp')
Ed Tanousf8ca6d72022-06-28 12:12:03 -070051endif
52
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053053# Disable lto when compiling with no optimization
Ed Tanousf2caadc2024-01-02 18:34:36 -080054if (get_option('optimization') == '0')
55 add_project_arguments('-fno-lto', language: 'cpp')
56 message('Disabling lto & its supported features as optimization is disabled')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053057endif
58
59# Include Directories
Ed Tanous3b28fa22024-09-23 14:51:55 -070060incdir = [
61 include_directories(
62 'include',
63 'redfish-core/include',
64 'redfish-core/lib',
65 'http',
66 ),
67]
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053068
Ed Tanous92e26be2024-08-21 13:39:14 -070069incdir_cli = include_directories('http', 'include')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053070
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053071# Add compiler arguments
Ed Tanous27f5ecf2025-02-09 09:46:52 -080072boost_flags = ['-Wno-unused-parameter']
73nghttp2_flags = []
Ed Tanousade3f092024-03-13 13:28:36 -070074if (cxx.get_id() == 'clang')
Ed Tanousf2caadc2024-01-02 18:34:36 -080075 if (cxx.version().version_compare('<17.0'))
76 error('This project requires clang-17 or higher')
77 endif
78 add_project_arguments(
79 '-Weverything',
80 '-Wformat=2',
Ed Tanous3d158642025-05-12 14:20:49 -070081 # https://github.com/llvm/llvm-project/issues/101614
82 '-fno-builtin-std-forward_like',
Ed Tanous25991f72024-06-13 18:10:25 -070083 '-Wno-c++20-extensions',
Ed Tanous27f5ecf2025-02-09 09:46:52 -080084 '-Wno-c++26-extensions',
Ed Tanousb5edf032025-02-09 09:45:00 -080085 '-Wno-c++98-compat',
86 '-Wno-c++98-compat-pedantic',
87 '-Wno-covered-switch-default',
88 '-Wno-disabled-macro-expansion',
Ed Tanousf2caadc2024-01-02 18:34:36 -080089 '-Wno-documentation',
Ed Tanousb5edf032025-02-09 09:45:00 -080090 '-Wno-documentation-unknown-command',
Ed Tanousf2caadc2024-01-02 18:34:36 -080091 '-Wno-exit-time-destructors',
92 '-Wno-global-constructors',
Ed Tanous27f5ecf2025-02-09 09:46:52 -080093 '-Wno-missing-include-dirs',
Ed Tanousf2caadc2024-01-02 18:34:36 -080094 '-Wno-newline-eof',
95 '-Wno-padded',
96 '-Wno-shadow',
Ed Tanousf2caadc2024-01-02 18:34:36 -080097 '-Wno-switch-enum',
Ed Tanous724985f2024-06-05 09:19:06 -070098 '-Wno-unneeded-internal-declaration',
Ed Tanous60b8de32024-12-18 11:01:53 -080099 '-Wno-unsafe-buffer-usage-in-container',
Ed Tanous3d158642025-05-12 14:20:49 -0700100 '-Wno-unsafe-buffer-usage-in-libc-call',
Ed Tanousb5edf032025-02-09 09:45:00 -0800101 '-Wno-unused-macros',
102 '-Wno-used-but-marked-unused',
103 '-Wno-weak-vtables',
Ed Tanousf2caadc2024-01-02 18:34:36 -0800104 language: 'cpp',
105 )
Ed Tanous5c467f92025-06-05 11:22:53 -0700106 if (cxx.version().version_compare('>=21.0'))
107 # TODO(Ed) These warnings look valid and need cleaned up.
108 add_project_arguments(
109 '-Wno-unique-object-duplication',
110 '-Wno-nrvo',
111 language: 'cpp',
112 )
113 endif
114
Ed Tanous27f5ecf2025-02-09 09:46:52 -0800115 boost_flags += ['-Wno-strict-prototypes', '-Wno-unused-but-set-variable']
116 nghttp2_flags += ['-Wno-extra-semi']
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530117endif
118
Ed Tanousade3f092024-03-13 13:28:36 -0700119if (cxx.get_id() == 'gcc')
Ed Tanousf2caadc2024-01-02 18:34:36 -0800120 if (cxx.version().version_compare('<13.0'))
121 error('This project requires gcc-13 or higher')
122 endif
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530123
Ed Tanousf2caadc2024-01-02 18:34:36 -0800124 add_project_arguments(
125 '-Wformat=2',
126 '-Wcast-align',
127 '-Wconversion',
128 '-Woverloaded-virtual',
129 '-Wsign-conversion',
130 '-Wunused',
131 '-Wduplicated-cond',
132 '-Wduplicated-branches',
133 '-Wlogical-op',
134 '-Wnull-dereference',
135 '-Wunused-parameter',
136 '-Wdouble-promotion',
137 '-Wshadow',
138 '-Wno-psabi',
139 '-Wno-attributes',
140 language: 'cpp',
141 )
Ed Tanousc66403c2021-09-22 15:28:57 -0700142endif
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530143
Ed Tanousc66403c2021-09-22 15:28:57 -0700144if (get_option('buildtype') != 'plain')
Ed Tanousf2caadc2024-01-02 18:34:36 -0800145 if (get_option('b_lto') == true and get_option('optimization') != '0')
146 # Reduce the binary size by removing unnecessary
147 # dynamic symbol table entries
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530148
Ed Tanousf2caadc2024-01-02 18:34:36 -0800149 add_project_arguments(
150 cxx.get_supported_arguments(
151 [
152 '-fno-fat-lto-objects',
153 '-fvisibility=hidden',
154 '-fvisibility-inlines-hidden',
155 ],
156 ),
157 language: 'cpp',
158 )
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530159
Ed Tanousf2caadc2024-01-02 18:34:36 -0800160 if cxx.has_link_argument('-Wl,--exclude-libs,ALL')
161 add_project_link_arguments('-Wl,--exclude-libs,ALL', language: 'cpp')
162 endif
George Liue8204932021-02-01 14:42:49 +0800163 endif
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530164endif
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530165# Set Compiler Security flags
166
167security_flags = [
Ed Tanousf2caadc2024-01-02 18:34:36 -0800168 '-fstack-protector-strong',
169 '-fPIE',
170 '-fPIC',
171 '-D_FORTIFY_SOURCE=2',
172 '-Wformat',
173 '-Wformat-security',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530174]
175
176## Add security flags for builds of type 'release','debugoptimized' and 'minsize'
177
Ed Tanous92e26be2024-08-21 13:39:14 -0700178if not (get_option('buildtype') == 'plain'
179or get_option('buildtype').startswith('debug')
Ed Tanousf2caadc2024-01-02 18:34:36 -0800180)
Ed Tanous92e26be2024-08-21 13:39:14 -0700181 add_project_arguments(
182 cxx.get_supported_arguments([security_flags]),
183 language: 'cpp',
184 )
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530185endif
186
187# Boost dependency configuration
188
189add_project_arguments(
Ed Tanousf2caadc2024-01-02 18:34:36 -0800190 cxx.get_supported_arguments(
191 [
Ed Tanousf2caadc2024-01-02 18:34:36 -0800192 '-DBOOST_ALL_NO_LIB',
193 '-DBOOST_ALLOW_DEPRECATED_HEADERS',
194 '-DBOOST_ASIO_DISABLE_THREADS',
195 '-DBOOST_ASIO_NO_DEPRECATED',
196 '-DBOOST_ASIO_SEPARATE_COMPILATION',
197 '-DBOOST_BEAST_SEPARATE_COMPILATION',
198 '-DBOOST_EXCEPTION_DISABLE',
199 '-DBOOST_NO_EXCEPTIONS',
200 '-DBOOST_URL_NO_SOURCE_LOCATION',
Ed Tanousf88b2172022-04-15 13:55:05 -0700201 '-DBOOST_SPIRIT_X3_NO_RTTI',
Ed Tanousf2caadc2024-01-02 18:34:36 -0800202 '-DJSON_NOEXCEPTION',
Ed Tanous82b286f2025-05-06 13:29:48 -0700203 '-DJSON_USE_IMPLICIT_CONVERSIONS=0',
Ed Tanousf2caadc2024-01-02 18:34:36 -0800204 '-DOPENSSL_NO_FILENAMES',
205 '-DSDBUSPLUS_DISABLE_BOOST_COROUTINES',
206 ],
207 ),
208 language: 'cpp',
209)
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530210
211# Find the dependency modules, if not found use meson wrap to get them
212# automatically during the configure step
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800213bmcweb_dependencies = []
Aushim Nagarkattibd1299b2024-08-12 17:11:04 -0700214bmcweb_cli_dependencies = []
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530215
Nan Zhou8682c5a2021-11-13 11:00:07 -0800216pam = cxx.find_library('pam', required: true)
Ed Tanousf2caadc2024-01-02 18:34:36 -0800217atomic = cxx.find_library('atomic', required: true)
Ed Tanouse7923992023-12-03 14:14:02 -0800218bmcweb_dependencies += [pam, atomic]
219
Ed Tanousf2caadc2024-01-02 18:34:36 -0800220openssl = dependency('openssl', required: false, version: '>=3.0.0')
Ed Tanousd033fd12025-03-13 11:16:24 -0700221if not openssl.found()
Ed Tanousf2caadc2024-01-02 18:34:36 -0800222 openssl_proj = subproject(
223 'openssl',
224 required: true,
225 default_options: ['warning_level=0', 'werror=false'],
226 )
227 openssl = openssl_proj.get_variable('openssl_dep')
228 openssl = openssl.as_system('system')
Ed Tanouse7923992023-12-03 14:14:02 -0800229endif
230bmcweb_dependencies += [openssl]
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530231
Ed Tanousb2539062024-03-12 16:58:35 -0700232zstd = dependency('libzstd', required: get_option('http-zstd').allowed())
233if zstd.found()
234 add_project_arguments('-DHAVE_ZSTD', language: 'cpp')
235 bmcweb_dependencies += [zstd]
236endif
Ed Tanousf2caadc2024-01-02 18:34:36 -0800237nghttp2 = dependency('libnghttp2', version: '>=1.52.0', required: false)
Ed Tanousfca2cbe2021-01-28 14:49:59 -0800238if not nghttp2.found()
Ed Tanousf2caadc2024-01-02 18:34:36 -0800239 cmake = import('cmake')
240 opt_var = cmake.subproject_options()
Ed Tanous211cfa42024-04-17 13:43:14 -0700241 opt_var.add_cmake_defines(
Ed Tanous27f5ecf2025-02-09 09:46:52 -0800242 {
243 'CMAKE_C_FLAGS': ' '.join(nghttp2_flags),
244 'CMAKE_CXX_FLAGS': ' '.join(nghttp2_flags),
245 'ENABLE_LIB_ONLY': true,
246 'ENABLE_STATIC_LIB': true,
247 },
Ed Tanous211cfa42024-04-17 13:43:14 -0700248 )
Ed Tanousf2caadc2024-01-02 18:34:36 -0800249 nghttp2_ex = cmake.subproject('nghttp2', options: opt_var)
Ed Tanous211cfa42024-04-17 13:43:14 -0700250 nghttp2 = nghttp2_ex.dependency('nghttp2')
Ed Tanousfca2cbe2021-01-28 14:49:59 -0800251endif
252bmcweb_dependencies += nghttp2
253
Patrick Williamsf57b2ec2025-08-11 10:53:16 -0400254sdbusplus = dependency('sdbusplus')
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800255bmcweb_dependencies += sdbusplus
Aushim Nagarkattibd1299b2024-08-12 17:11:04 -0700256bmcweb_cli_dependencies += sdbusplus
257
Ed Tanous92e26be2024-08-21 13:39:14 -0700258cli11 = dependency('CLI11', required: false, include_type: 'system')
Aushim Nagarkattibd1299b2024-08-12 17:11:04 -0700259if not cli11.found()
Ed Tanous92e26be2024-08-21 13:39:14 -0700260 cli11_proj = subproject('cli11', required: true)
261 cli11 = cli11_proj.get_variable('CLI11_dep')
262 cli11 = cli11.as_system('system')
Aushim Nagarkattibd1299b2024-08-12 17:11:04 -0700263endif
264bmcweb_cli_dependencies += cli11
265
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530266
Ed Tanousc9374ff2023-05-26 09:42:08 -0700267tinyxml = dependency(
268 'tinyxml2',
Cody Smith3a097b22022-05-19 14:22:32 -0700269 include_type: 'system',
Ed Tanousc9374ff2023-05-26 09:42:08 -0700270 version: '>=9.0.0',
Konstantin Aladyshev60e299b2024-04-03 11:44:51 +0300271 default_options: ['tests=false'],
Cody Smith3a097b22022-05-19 14:22:32 -0700272)
Ed Tanousc9374ff2023-05-26 09:42:08 -0700273if not tinyxml.found()
274 tinyxml_proj = subproject('tinyxml2', required: true)
275 tinyxml = tinyxml_proj.get_variable('tinyxml_dep')
276 tinyxml = tinyxml.as_system('system')
277endif
Cody Smith3a097b22022-05-19 14:22:32 -0700278bmcweb_dependencies += tinyxml
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530279
280systemd = dependency('systemd')
Patrick Williams058f54e2024-09-03 16:07:55 -0400281libsystemd = dependency('libsystemd')
Ed Tanous77dcace2024-09-07 16:38:05 -0700282add_project_arguments(
283 '-DLIBSYSTEMD_VERSION=' + libsystemd.version(),
284 language: 'cpp',
285)
Ed Tanous055713e2024-07-17 17:19:36 -0700286
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530287zlib = dependency('zlib')
Patrick Williams058f54e2024-09-03 16:07:55 -0400288bmcweb_dependencies += [libsystemd, zlib]
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530289
Ed Tanous92e26be2024-08-21 13:39:14 -0700290nlohmann_json_dep = dependency(
291 'nlohmann_json',
Patrick Williams0183e472024-10-10 12:31:07 -0400292 version: '>=3.11.3',
Ed Tanous92e26be2024-08-21 13:39:14 -0700293 include_type: 'system',
294)
Patrick Williamsdfd55472023-12-07 11:50:37 -0600295bmcweb_dependencies += nlohmann_json_dep
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530296
Carson Labrado2b5b4da2023-10-18 00:02:10 +0000297boost = dependency(
Ed Tanousf2caadc2024-01-02 18:34:36 -0800298 'boost',
Ed Tanous92e26be2024-08-21 13:39:14 -0700299 modules: ['url'],
Ed Tanousf2caadc2024-01-02 18:34:36 -0800300 version: '>=1.84.0',
301 required: false,
Ed Tanous5e2f0992024-12-02 20:23:51 -0800302 static: true,
Ed Tanousf2caadc2024-01-02 18:34:36 -0800303 include_type: 'system',
Carson Labrado2b5b4da2023-10-18 00:02:10 +0000304)
Jayanth Othayoth90fcc262024-11-11 06:24:49 -0600305
306# Boost version is 1.86 or higher to include the 'process' module
307if boost.version().version_compare('>=1.86.0')
308 boost = dependency(
309 'boost',
310 modules: ['url', 'process'],
311 version: '>=1.86.0',
Ed Tanous5e2f0992024-12-02 20:23:51 -0800312 static: true,
Jayanth Othayoth90fcc262024-11-11 06:24:49 -0600313 required: false,
314 include_type: 'system',
315 )
316endif
317
Ed Tanous6fd29552023-10-04 09:40:14 -0700318if boost.found()
Ed Tanous92e26be2024-08-21 13:39:14 -0700319 bmcweb_dependencies += [boost]
320 bmcweb_cli_dependencies += [boost]
Ed Tanous6fd29552023-10-04 09:40:14 -0700321else
Ed Tanousf2caadc2024-01-02 18:34:36 -0800322 cmake = import('cmake')
323 opt = cmake.subproject_options()
Ed Tanousf80a87f2024-06-16 12:10:33 -0700324 boost_libs = [
325 'asio',
326 'beast',
327 'circular_buffer',
328 'callable_traits',
329 'headers',
330 'process',
331 'type_index',
332 'url',
333 'uuid',
334 'spirit',
335 ]
Ed Tanousf2caadc2024-01-02 18:34:36 -0800336 opt.add_cmake_defines(
337 {
Ed Tanous27f5ecf2025-02-09 09:46:52 -0800338 'CMAKE_CXX_FLAGS': ' '.join(boost_flags),
339 'CMAKE_C_FLAGS': ' '.join(boost_flags),
Ed Tanousf80a87f2024-06-16 12:10:33 -0700340 'BOOST_INCLUDE_LIBRARIES': ';'.join(boost_libs),
Ed Tanousf2caadc2024-01-02 18:34:36 -0800341 'BUILD_SHARED_LIBS': 'OFF',
342 },
343 )
Ed Tanous144983c2024-03-28 00:39:10 -0700344
Ed Tanousf2caadc2024-01-02 18:34:36 -0800345 boost = cmake.subproject('boost', required: true, options: opt)
Ed Tanousf80a87f2024-06-16 12:10:33 -0700346 foreach boost_lib : boost_libs
347 boost_lib_instance = boost.dependency('boost_' + boost_lib).as_system()
348 bmcweb_dependencies += [boost_lib_instance]
Aushim Nagarkattibd1299b2024-08-12 17:11:04 -0700349 bmcweb_cli_dependencies += [boost_lib_instance]
Ed Tanousf80a87f2024-06-16 12:10:33 -0700350 endforeach
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530351endif
352
Patrick Williams1174aad2025-07-09 11:27:58 -0400353systemd_system_unit_dir = systemd.get_variable('systemd_system_unit_dir')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530354
Ed Tanous92e26be2024-08-21 13:39:14 -0700355bindir = get_option('prefix') + '/' + get_option('bindir')
Aushim Nagarkattibd1299b2024-08-12 17:11:04 -0700356libexec = get_option('prefix') + '/' + get_option('libexecdir')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530357
Ed Tanousf2caadc2024-01-02 18:34:36 -0800358summary(
359 {
360 'prefix': get_option('prefix'),
361 'bindir': bindir,
362 'systemd unit directory': systemd_system_unit_dir,
363 },
364 section: 'Directories',
365)
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530366
Ed Tanousa529a6a2024-05-29 16:51:37 -0700367subdir('static')
368subdir('redfish-core')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530369
Nan Zhou307386e2022-10-12 20:29:34 +0000370# Config subdirectory
Nan Zhou307386e2022-10-12 20:29:34 +0000371subdir('config')
372bmcweb_dependencies += conf_h_dep
Aushim Nagarkattibd1299b2024-08-12 17:11:04 -0700373bmcweb_cli_dependencies += conf_h_dep
Nan Zhou307386e2022-10-12 20:29:34 +0000374
Ed Tanous3b28fa22024-09-23 14:51:55 -0700375test_sources = []
376subdir('features')
377
Ed Tanous02f1cd92021-10-27 12:09:06 -0700378# Source files
Nan Zhou0ad63df2022-10-17 23:03:21 +0000379fs = import('fs')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530380
Nan Zhou0ad63df2022-10-17 23:03:21 +0000381srcfiles_bmcweb = files(
Ed Tanous724985f2024-06-05 09:19:06 -0700382 'http/mutual_tls.cpp',
Ed Tanouse60300a2025-02-23 12:31:53 -0800383 'http/routing/sserule.cpp',
Ed Tanousbeb96b02025-02-09 09:22:46 -0800384 'http/routing/websocketrule.cpp',
Ed Tanousb2539062024-03-12 16:58:35 -0700385 'http/zstd_decompressor.cpp',
Ed Tanousb26ff342024-11-22 11:47:08 -0800386 'redfish-core/src/dbus_log_watcher.cpp',
Ed Tanous6c038f22025-01-14 09:46:04 -0800387 'redfish-core/src/error_message_utils.cpp',
Patrick Williams24050912025-02-01 08:38:29 -0500388 'redfish-core/src/error_messages.cpp',
Alexander Hansenb80ba2e2024-11-18 12:24:35 +0100389 'redfish-core/src/event_log.cpp',
Ed Tanous2185dde2024-11-22 11:33:51 -0800390 'redfish-core/src/filesystem_log_watcher.cpp',
Ed Tanous25991f72024-06-13 18:10:25 -0700391 'redfish-core/src/filter_expr_executor.cpp',
Ed Tanousf88b2172022-04-15 13:55:05 -0700392 'redfish-core/src/filter_expr_printer.cpp',
Ed Tanousa8a5bc12024-12-02 15:43:16 -0800393 'redfish-core/src/heartbeat_messages.cpp',
Ed Tanousf2caadc2024-01-02 18:34:36 -0800394 'redfish-core/src/redfish.cpp',
395 'redfish-core/src/registries.cpp',
Ed Tanousa8a5bc12024-12-02 15:43:16 -0800396 'redfish-core/src/resource_messages.cpp',
Alexander Hansen02c1e292024-11-15 14:30:40 +0100397 'redfish-core/src/subscription.cpp',
Ed Tanousa8a5bc12024-12-02 15:43:16 -0800398 'redfish-core/src/task_messages.cpp',
Alexander Hansend3616d12025-08-12 13:25:55 +0200399 'redfish-core/src/update_messages.cpp',
Ed Tanousf2caadc2024-01-02 18:34:36 -0800400 'redfish-core/src/utils/dbus_utils.cpp',
401 'redfish-core/src/utils/json_utils.cpp',
402 'redfish-core/src/utils/time_utils.cpp',
403 'src/boost_asio.cpp',
404 'src/boost_asio_ssl.cpp',
405 'src/boost_beast.cpp',
406 'src/dbus_singleton.cpp',
Ed Tanousbb1c7d32025-02-09 09:39:19 -0800407 'src/dbus_utility.cpp',
Ed Tanousf2caadc2024-01-02 18:34:36 -0800408 'src/json_html_serializer.cpp',
409 'src/ossl_random.cpp',
Ed Tanous724985f2024-06-05 09:19:06 -0700410 'src/ssl_key_handler.cpp',
Ed Tanousf2caadc2024-01-02 18:34:36 -0800411 'src/webserver_run.cpp',
Nan Zhou0ad63df2022-10-17 23:03:21 +0000412)
Ed Tanous02f1cd92021-10-27 12:09:06 -0700413
Ed Tanous42bbcd82023-01-07 18:04:28 -0800414bmcweblib = static_library(
Ed Tanousf2caadc2024-01-02 18:34:36 -0800415 'bmcweblib',
416 srcfiles_bmcweb,
417 include_directories: incdir,
418 dependencies: bmcweb_dependencies,
Ed Tanous42bbcd82023-01-07 18:04:28 -0800419)
420
Aushim Nagarkattibd1299b2024-08-12 17:11:04 -0700421# Generate the bmcwebd daemon
Ed Tanous02f1cd92021-10-27 12:09:06 -0700422executable(
Ed Tanous92e26be2024-08-21 13:39:14 -0700423 'bmcwebd',
424 'src/webserver_main.cpp',
425 include_directories: incdir,
426 dependencies: bmcweb_dependencies,
427 link_with: bmcweblib,
428 link_args: '-Wl,--gc-sections',
429 install: true,
430 install_dir: libexec,
Aushim Nagarkattibd1299b2024-08-12 17:11:04 -0700431)
432
433# Generate the bmcweb CLI application
434executable(
Ed Tanous92e26be2024-08-21 13:39:14 -0700435 'bmcweb',
436 ['src/webserver_cli.cpp', 'src/boost_asio.cpp'],
437 include_directories: incdir_cli,
438 dependencies: bmcweb_cli_dependencies,
439 install: true,
440 install_dir: bindir,
Ed Tanous02f1cd92021-10-27 12:09:06 -0700441)
442
Alexander Hansend49d8472025-07-21 15:30:52 +0200443subdir('test')