blob: 054b35fae0828873c8aa0d2c3f89391d9bc963d0 [file] [log] [blame]
Manojkiran Edaaf6298d2020-05-27 08:51:32 +05301project('bmcweb', 'cpp',
2 version : '1.0',
Patrick Williamsc52ee722021-10-06 15:17:42 -05003 meson_version: '>=0.57.0',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +05304 default_options: [
Manojkiran Edacb2ed192021-02-15 08:30:43 +05305 'b_lto_mode=default',
Ed Tanousf523c322021-12-03 10:46:48 -08006 'b_lto_threads=0',
7 'b_lto=true',
8 'b_ndebug=if-release',
9 'buildtype=debugoptimized',
10 'cpp_rtti=false',
11 'cpp_std=c++20',
12 'warning_level=3',
13 'werror=true',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053014 ])
15
16# Project related links
17
18project_pretty_name = 'bmcweb'
19project_url = 'https://github.com/openbmc/' + project_pretty_name
20project_issues_url = project_url + '/issues/new'
21summary('Issues',project_issues_url, section: 'Report Issues')
22
23# Validate the c++ Standard
24
Patrick Williamsc52ee722021-10-06 15:17:42 -050025if get_option('cpp_std') != 'c++20'
26 error('This project requires c++20 support')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053027endif
28
29# Get compiler and default build type
30
31cxx = meson.get_compiler('cpp')
32build = get_option('buildtype')
33optimization = get_option('optimization')
34summary('Build Type',build, section : 'Build Info')
35summary('Optimization',optimization, section : 'Build Info')
36
Ed Tanous5e34b672021-02-05 14:21:27 -080037
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053038# remove debug information for minsize buildtype
39if(get_option('buildtype') == 'minsize')
Ed Tanous5e34b672021-02-05 14:21:27 -080040 add_project_arguments(['-fdata-sections', '-ffunction-sections'], language : 'cpp')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053041 add_project_arguments('-DNDEBUG', language : 'cpp')
42endif
43
44# Disable lto when compiling with no optimization
45if(get_option('optimization') == '0')
46 add_project_arguments('-fno-lto', language: 'cpp')
47 message('Disabling lto & its supported features as optimization is disabled')
48endif
49
50# Include Directories
51
Ed Tanouscf2f9322021-09-22 15:34:41 -070052incdir = include_directories(
53 'include',
54 'redfish-core/include',
55 'redfish-core/lib',
56 'http'
57)
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053058
59# Get the options and enable the respective features
60## create a MAP of "options : feature_flag"
61
62feature_map = {
Manojkiran Eda2d74fbc2021-10-28 12:39:49 +053063 'basic-auth' : '-DBMCWEB_ENABLE_BASIC_AUTHENTICATION',
64 'cookie-auth' : '-DBMCWEB_ENABLE_COOKIE_AUTHENTICATION',
65 'google-api' : '-DBMCWEB_ENABLE_GOOGLE_API',
66 'host-serial-socket' : '-DBMCWEB_ENABLE_HOST_SERIAL_WEBSOCKET',
67 'ibm-management-console' : '-DBMCWEB_ENABLE_IBM_MANAGEMENT_CONSOLE',
68 'insecure-disable-auth' : '-DBMCWEB_INSECURE_DISABLE_AUTHENTICATION',
69 'insecure-disable-csrf' : '-DBMCWEB_INSECURE_DISABLE_CSRF_PREVENTION',
70 'insecure-disable-ssl' : '-DBMCWEB_INSECURE_DISABLE_SSL',
71 'insecure-push-style-notification' : '-DBMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING',
72 'insecure-tftp-update' : '-DBMCWEB_INSECURE_ENABLE_REDFISH_FW_TFTP_UPDATE',
73 'kvm' : '-DBMCWEB_ENABLE_KVM' ,
74 'mutual-tls-auth' : '-DBMCWEB_ENABLE_MUTUAL_TLS_AUTHENTICATION',
Carson Labrado7fb33562022-04-18 23:26:56 +000075 'redfish-aggregation' : '-DBMCWEB_ENABLE_REDFISH_AGGREGATION',
Ed Tanousf523c322021-12-03 10:46:48 -080076 'redfish-allow-deprecated-power-thermal' : '-DBMCWEB_ALLOW_DEPRECATED_POWER_THERMAL',
Manojkiran Eda2d74fbc2021-10-28 12:39:49 +053077 'redfish-bmc-journal' : '-DBMCWEB_ENABLE_REDFISH_BMC_JOURNAL',
78 'redfish-cpu-log' : '-DBMCWEB_ENABLE_REDFISH_CPU_LOG',
79 'redfish-dbus-log' : '-DBMCWEB_ENABLE_REDFISH_DBUS_LOG_ENTRIES',
80 'redfish-dump-log' : '-DBMCWEB_ENABLE_REDFISH_DUMP_LOG',
Ed Tanousf523c322021-12-03 10:46:48 -080081 'redfish-host-logger' : '-DBMCWEB_ENABLE_REDFISH_HOST_LOGGER',
Manojkiran Eda2d74fbc2021-10-28 12:39:49 +053082 'redfish-new-powersubsystem-thermalsubsystem' : '-DBMCWEB_NEW_POWERSUBSYSTEM_THERMALSUBSYSTEM',
Ed Tanousf523c322021-12-03 10:46:48 -080083 'redfish-provisioning-feature' : '-DBMCWEB_ENABLE_REDFISH_PROVISIONING_FEATURE',
Ed Tanous4dc23f32022-05-11 11:32:19 -070084 'redfish-post-to-old-updateservice' : '-DBMCWEB_ENABLE_REDFISH_UPDATESERVICE_OLD_POST_URL',
Ed Tanousf523c322021-12-03 10:46:48 -080085 'redfish' : '-DBMCWEB_ENABLE_REDFISH',
86 'rest' : '-DBMCWEB_ENABLE_DBUS_REST',
Manojkiran Eda2d74fbc2021-10-28 12:39:49 +053087 'session-auth' : '-DBMCWEB_ENABLE_SESSION_AUTHENTICATION',
88 'static-hosting' : '-DBMCWEB_ENABLE_STATIC_HOSTING',
Manojkiran Eda2d74fbc2021-10-28 12:39:49 +053089 'vm-websocket' : '-DBMCWEB_ENABLE_VM_WEBSOCKET',
90 'xtoken-auth' : '-DBMCWEB_ENABLE_XTOKEN_AUTHENTICATION',
Ed Tanousf523c322021-12-03 10:46:48 -080091 #'vm-nbdproxy' : '-DBMCWEB_ENABLE_VM_NBDPROXY',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +053092}
93
94# Get the options status and build a project summary to show which flags are
95# being enabled during the configuration time.
96
97foreach option_key,option_value : feature_map
98 if(get_option(option_key).enabled())
99 if(option_key == 'mutual-tls-auth' or option_key == 'insecure-disable-ssl')
100 if(get_option('insecure-disable-ssl').disabled() or get_option('mutual-tls-auth').disabled())
101 add_project_arguments(option_value,language:'cpp')
102 summary(option_key,option_value, section : 'Enabled Features')
103 endif
104 else
105 summary(option_key,option_value, section : 'Enabled Features')
106 add_project_arguments(option_value,language:'cpp')
107 endif
108 else
109 if(option_key == 'insecure-disable-ssl')
110 summary('ssl','-DBMCWEB_ENABLE_SSL', section : 'Enabled Features')
111 add_project_arguments('-DBMCWEB_ENABLE_SSL', language : 'cpp')
112 endif
113 endif
114endforeach
115
116if(get_option('tests').enabled())
117 summary('unittest','NA', section : 'Enabled Features')
118endif
119
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530120# Add compiler arguments
121
122# -Wpedantic, -Wextra comes by default with warning level
123add_project_arguments(
124 cxx.get_supported_arguments([
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530125 '-Wcast-align',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530126 '-Wconversion',
Ed Tanousf523c322021-12-03 10:46:48 -0800127 '-Wformat=2',
128 '-Wold-style-cast',
129 '-Woverloaded-virtual',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530130 '-Wsign-conversion',
Ed Tanousf523c322021-12-03 10:46:48 -0800131 '-Wunused',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530132 '-Wno-attributes',
133 ]),
134 language: 'cpp'
135)
136
137if (cxx.get_id() == 'clang' and cxx.version().version_compare('>9.0'))
138add_project_arguments(
139 cxx.get_supported_arguments([
140 '-Weverything',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530141 '-Wno-c++98-compat-pedantic',
Ed Tanousf523c322021-12-03 10:46:48 -0800142 '-Wno-c++98-compat',
143 '-Wno-documentation-unknown-command',
144 '-Wno-documentation',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530145 '-Wno-exit-time-destructors',
Ed Tanousf523c322021-12-03 10:46:48 -0800146 '-Wno-global-constructors',
147 '-Wno-newline-eof',
148 '-Wno-padded',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530149 '-Wno-shadow',
150 '-Wno-used-but-marked-unused',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530151 '-Wno-weak-vtables',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530152 ]),
153 language:'cpp')
154endif
155
156# if compiler is gnu-gcc , and version is > 8.0 then we add few more
157# compiler arguments , we know that will pass
158
159if (cxx.get_id() == 'gcc' and cxx.version().version_compare('>8.0'))
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530160 add_project_arguments(
161 cxx.get_supported_arguments([
162 '-Wduplicated-cond',
163 '-Wduplicated-branches',
164 '-Wlogical-op',
165 '-Wunused-parameter',
166 '-Wnull-dereference',
167 '-Wdouble-promotion',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530168 ]),
169 language:'cpp')
Ed Tanousc66403c2021-09-22 15:28:57 -0700170endif
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530171
Ed Tanousc66403c2021-09-22 15:28:57 -0700172if (get_option('buildtype') != 'plain')
173 if (get_option('b_lto') == true and get_option('optimization')!='0')
174 # Reduce the binary size by removing unnecessary
175 # dynamic symbol table entries
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530176
Ed Tanousc66403c2021-09-22 15:28:57 -0700177 add_project_arguments(
178 cxx.get_supported_arguments([
179 '-fno-fat-lto-objects',
180 '-fvisibility=hidden',
181 '-fvisibility-inlines-hidden'
182 ]),
183 language: 'cpp')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530184
Ed Tanousc66403c2021-09-22 15:28:57 -0700185 if cxx.has_link_argument('-Wl,--exclude-libs,ALL')
186 add_project_link_arguments('-Wl,--exclude-libs,ALL', language: 'cpp')
George Liue8204932021-02-01 14:42:49 +0800187 endif
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530188 endif
189endif
190
Ed Tanousc66403c2021-09-22 15:28:57 -0700191if( get_option('bmcweb-logging').enabled() or \
192 get_option('buildtype').startswith('debug'))
193 add_project_arguments([
194 '-DBMCWEB_ENABLE_LOGGING',
195 '-DBMCWEB_ENABLE_DEBUG'
196 ],
197 language : 'cpp')
198
199 summary({'debug' :'-DBMCWEB_ENABLE_DEBUG',
200 'logging' : '-DBMCWEB_ENABLE_LOGGING',
Ed Tanousc66403c2021-09-22 15:28:57 -0700201
Ed Tanousc66403c2021-09-22 15:28:57 -0700202 },section : 'Enabled Features')
203endif
204
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530205# Set Compiler Security flags
206
207security_flags = [
Ed Tanouscf2f9322021-09-22 15:34:41 -0700208 '-fstack-protector-strong',
209 '-fPIE',
210 '-fPIC',
211 '-D_FORTIFY_SOURCE=2',
212 '-Wformat',
213 '-Wformat-security'
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530214]
215
216## Add security flags for builds of type 'release','debugoptimized' and 'minsize'
217
218if not (get_option('buildtype') == 'plain' or get_option('buildtype').startswith('debug'))
219 add_project_arguments(
220 cxx.get_supported_arguments([
221 security_flags
222 ]),
223 language: 'cpp')
224endif
225
226# Boost dependency configuration
227
228add_project_arguments(
229cxx.get_supported_arguments([
Ed Tanouscf2f9322021-09-22 15:34:41 -0700230 '-DBOOST_ALL_NO_LIB',
Ed Tanouscf2f9322021-09-22 15:34:41 -0700231 '-DBOOST_ALLOW_DEPRECATED_HEADERS',
Ed Tanousf523c322021-12-03 10:46:48 -0800232 '-DBOOST_ASIO_DISABLE_THREADS',
233 '-DBOOST_ASIO_NO_DEPRECATED',
234 '-DBOOST_ASIO_SEPARATE_COMPILATION',
235 '-DBOOST_BEAST_SEPARATE_COMPILATION',
236 '-DBOOST_BEAST_USE_STD_STRING_VIEW',
Ed Tanous9e710e72022-03-12 17:40:04 -0800237 '-DBOOST_EXCEPTION_DISABLE',
238 '-DJSON_NOEXCEPTION',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530239]),
240language : 'cpp')
241
242# Find the dependency modules, if not found use meson wrap to get them
243# automatically during the configure step
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800244bmcweb_dependencies = []
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530245
Nan Zhou8682c5a2021-11-13 11:00:07 -0800246pam = cxx.find_library('pam', required: true)
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530247atomic = cxx.find_library('atomic', required: true)
248openssl = dependency('openssl', required : true)
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800249bmcweb_dependencies += [pam, atomic, openssl]
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530250
Ed Tanous7bb985e2021-09-02 14:31:40 -0700251sdbusplus = dependency('sdbusplus', required : false, include_type: 'system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530252if not sdbusplus.found()
253 sdbusplus_proj = subproject('sdbusplus', required: true)
254 sdbusplus = sdbusplus_proj.get_variable('sdbusplus_dep')
255 sdbusplus = sdbusplus.as_system('system')
256endif
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800257bmcweb_dependencies += sdbusplus
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530258
Cody Smith3a097b22022-05-19 14:22:32 -0700259tinyxml = dependency('tinyxml2',
260 default_options: ['tests=false'],
261 include_type: 'system',
262)
263bmcweb_dependencies += tinyxml
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530264
265systemd = dependency('systemd')
266zlib = dependency('zlib')
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800267bmcweb_dependencies += [systemd, zlib]
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530268
269if cxx.has_header('nlohmann/json.hpp')
270 nlohmann_json = declare_dependency()
271else
Josh Lehan259df352021-10-07 15:20:02 -0700272 nlohmann_json_proj = subproject('nlohmann', required: true)
273 nlohmann_json = nlohmann_json_proj.get_variable('nlohmann_json_dep')
Ed Tanousb00dcc22021-02-23 12:52:50 -0800274 nlohmann_json = nlohmann_json.as_system('system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530275endif
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800276bmcweb_dependencies += nlohmann_json
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530277
Nan Zhou6bbda2c2022-02-21 12:47:41 -0800278boost = dependency('boost',version : '>=1.78.0', required : false, include_type: 'system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530279if not boost.found()
280 subproject('boost', required: false)
Nan Zhou6bbda2c2022-02-21 12:47:41 -0800281 boost_inc = include_directories('subprojects/boost_1_78_0/', is_system:true)
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530282 boost = declare_dependency(include_directories : boost_inc)
Ed Tanousb00dcc22021-02-23 12:52:50 -0800283 boost = boost.as_system('system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530284endif
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800285bmcweb_dependencies += boost
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530286
287if cxx.has_header('boost/url/url_view.hpp')
288 boost_url = declare_dependency()
289else
290 subproject('boost-url', required: false)
291 boost_url_inc = include_directories('subprojects/boost-url/include', is_system:true)
292 boost_url= declare_dependency(include_directories : boost_url_inc)
Ed Tanousb00dcc22021-02-23 12:52:50 -0800293 boost_url = boost_url.as_system('system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530294endif
Jason M. Billsceb8ddc2020-11-23 14:38:39 -0800295bmcweb_dependencies += boost_url
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530296
297if get_option('tests').enabled()
298 gtest = dependency('gtest', main: true,disabler: true, required : false)
299 gmock = dependency('gmock', required : false)
300 if not gtest.found() and get_option('tests').enabled()
301 gtest_proj = subproject('gtest', required: true)
302 gtest = gtest_proj.get_variable('gtest_main_dep')
303 gmock = gtest_proj.get_variable('gmock_dep')
304 endif
Ed Tanousb00dcc22021-02-23 12:52:50 -0800305 gtest = gtest.as_system('system')
306 gmock = gmock.as_system('system')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530307endif
308
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530309# Gather the Configuration data
310
311conf_data = configuration_data()
Ed Tanous0260d9d2021-02-07 19:31:07 +0000312conf_data.set('BMCWEB_HTTP_REQ_BODY_LIMIT_MB', get_option('http-body-limit'))
313xss_enabled = get_option('insecure-disable-xss')
Ed Tanousfeaf1502021-02-23 08:53:50 -0800314conf_data.set10('BMCWEB_INSECURE_DISABLE_XSS_PREVENTION', xss_enabled.enabled())
Ed Tanousfa0b2172022-03-24 10:25:03 -0700315enable_redfish_query = get_option('insecure-enable-redfish-query')
316conf_data.set10('BMCWEB_INSECURE_ENABLE_QUERY_PARAMS', enable_redfish_query.enabled())
Carson Labrado7fb33562022-04-18 23:26:56 +0000317# enable_redfish_aggregation = get_option('redfish-aggregation')
318# conf_data.set10('BMCWEB_ENABLE_REDFISH_AGGREGATION', enable_redfish_aggregation.enabled())
Ed Tanouseb1c47d2022-02-09 11:47:27 -0800319insecure_push_style_notification = get_option('insecure-push-style-notification')
320conf_data.set10('BMCWEB_INSECURE_ENABLE_HTTP_PUSH_STYLE_EVENTING', insecure_push_style_notification.enabled())
Ed Tanous0260d9d2021-02-07 19:31:07 +0000321conf_data.set('MESON_INSTALL_PREFIX', get_option('prefix'))
Vivekanand Veeracholan54d13552021-06-14 19:16:36 -0700322conf_data.set('HTTPS_PORT', get_option('https_port'))
Ed Tanous75312982021-02-11 14:26:02 -0800323configure_file(input: 'bmcweb_config.h.in',
324 output: 'bmcweb_config.h',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530325 configuration: conf_data)
326
327# Configure and install systemd unit files
328
Patrick Williams6a779932021-10-12 20:08:44 -0500329systemd_system_unit_dir = systemd.get_variable(pkgconfig: 'systemdsystemunitdir')
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530330
331bindir = get_option('prefix') + '/' +get_option('bindir')
332
333summary({
334 'prefix' : get_option('prefix'),
335 'bindir' : bindir,
336 'systemd unit directory' : systemd_system_unit_dir
337 }, section : 'Directories')
338
Vivekanand Veeracholan54d13552021-06-14 19:16:36 -0700339configure_file(input : 'bmcweb.socket.in',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530340 output : 'bmcweb.socket',
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530341 install_dir: systemd_system_unit_dir,
Vivekanand Veeracholan54d13552021-06-14 19:16:36 -0700342 configuration: conf_data,
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530343 install : true)
344
345configure_file(input : 'bmcweb.service.in',
346 output : 'bmcweb.service',
347 install_dir: systemd_system_unit_dir,
348 configuration: conf_data,
349 install : true)
350
351# Copy pam-webserver to etc/pam.d
352configure_file(input : 'pam-webserver',
353 output : 'webserver',
354 copy : true,
355 install_dir: '/etc/pam.d',
356 install : true)
357
358install_subdir('static', install_dir : 'share/www', strip_directory : true)
359
Ed Tanous02f1cd92021-10-27 12:09:06 -0700360# Source files
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530361
Ed Tanous02f1cd92021-10-27 12:09:06 -0700362srcfiles_bmcweb = [
363 'redfish-core/src/error_messages.cpp',
364 'redfish-core/src/utils/json_utils.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700365 'src/boost_asio_ssl.cpp',
Ed Tanousf523c322021-12-03 10:46:48 -0800366 'src/boost_asio.cpp',
367 'src/boost_beast.cpp',
368 'src/boost_url.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700369]
370
371# Generate the bmcweb executable
372executable(
373 'bmcweb',
374 srcfiles_bmcweb + ['src/webserver_main.cpp'],
375 include_directories : incdir,
376 dependencies: bmcweb_dependencies,
377 link_args: '-Wl,--gc-sections',
378 install: true,
379 install_dir:bindir
380)
381
382srcfiles_unittest = [
Ed Tanousf523c322021-12-03 10:46:48 -0800383 'http/ut/utility_test.cpp',
Ed Tanous88a03c52022-03-14 10:16:07 -0700384 'http/ut/router_test.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700385 'include/ut/dbus_utility_test.cpp',
386 'include/ut/http_utility_test.cpp',
387 'include/ut/human_sort_test.cpp',
Ed Tanousc5ba4c22022-02-07 09:59:55 -0800388 'include/ut/multipart_test.cpp',
Josh Lehan482c45a2022-03-29 17:10:44 -0700389 'include/ut/openbmc_dbus_rest_test.cpp',
Ed Tanous7cf436c2022-03-22 23:53:51 -0700390 'redfish-core/include/utils/query_param_test.cpp',
391 'redfish-core/lib/ut/service_root_test.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700392 'redfish-core/ut/configfile_test.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700393 'redfish-core/ut/hex_utils_test.cpp',
Willy Tu15ed6782021-12-14 11:03:16 -0800394 'redfish-core/ut/json_utils_test.cpp',
Ed Tanousf523c322021-12-03 10:46:48 -0800395 'redfish-core/ut/lock_test.cpp',
396 'redfish-core/ut/privileges_test.cpp',
Ed Tanousc5ba4c22022-02-07 09:59:55 -0800397 'redfish-core/ut/registries_test.cpp',
Ed Tanousf523c322021-12-03 10:46:48 -0800398 'redfish-core/ut/stl_utils_test.cpp',
399 'redfish-core/ut/time_utils_test.cpp',
Ed Tanous02f1cd92021-10-27 12:09:06 -0700400]
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530401
402if(get_option('tests').enabled())
Ed Tanous02f1cd92021-10-27 12:09:06 -0700403 # generate the test executable
404 ut_bin = executable(
405 'bmcweb_unit_test',
406 srcfiles_unittest + srcfiles_bmcweb,
407 include_directories : incdir,
408 install_dir: bindir,
409 dependencies: bmcweb_dependencies + [
410 gtest,
411 gmock,
412 ]
413 )
414 test('bmcweb_unit_test', ut_bin)
Manojkiran Edaaf6298d2020-05-27 08:51:32 +0530415endif